changed latency measurement publishing to publisher