Correct time measurement code