peer to peer communication - latency calculation
===

I want to measure my c program time(in millis). the thing is that my program do p2p communication with other pc using UDP sockets. let's say I have pc1 and pc2,
pc1 do stuff, then it sends data to pc2, then pc2 handle that data and some stuff with it.
I want to measure the whole process time.

Any ideas?
Thanks.