prof7bit/TorChat — pull request #11 by RubenRocha (2012-06-05 21:15:33+00:00)
Title: /ping command

I've added a /ping command to test latency between 2 people.
How it works is:
- When you type /ping it sends them a message containing "/ping " + a 6 character unique id
- They get that /ping request and send you a /PONG + the unique id
- You check the sent time for /ping and the received time for /PONG and subtract them(Received time - send time) then you divide by 2(So instead of getting the time for 2 messages(You sending to him, and he sending /pong back to you, you get the time for 1 message).