V1.2: added latency measurement.