Add latency measurement for XMPP messages