Added latency measurement.