Fix time measurement