Added time measurement debug code for testing purposes.