fix time measurement.