latency: fix calculation for multi-thread