Update time measurement code