add time measurement.