My server broadcasts a packet to a browser client every now and then.
Is there any way to figure out how long it took from the packet from:
server --> client
I'm trying to time something, so ideally my JavaScript function would be like:
var travelTime = {amount of time it took packet to get to me};
setTimeout('myFunction()', 3000 + travelTime);
Also, I'm not requesting this packet so I can't log the send time, and log the recieve time on the client side. This packet request is not bi-directional, as I establish a socket with the server and the server has the ability to just fire me a packet.
Any advice is appriciated!
EDIT: comet-style connection