# Determining network latency

• 08-12-2009
cyberfish
Determining network latency
Out of curiosity, is there a way to determine network latency between two computers with unsynced clocks?

Roundtrip time is easy, but what about one way time? (assuming they are more or less constant)

I'm guessing there's theoretically a way to do it, since there's NTP that can synchronize clocks (if clocks can be synchronized, measuring latency would be easy).

Thanks
• 08-12-2009
abachler
assuming you think the latency is different in each direction, yes, but it takes 4 packets to do it, because only the far client can initiate a sequence that results in the local client having enough info, which requires 3 additional packets

I'm working out the maths now, although i'm probably reinventing the wheel.

It still requires coordinated clocks, meaning both clocks have to agree on how long a second is.
• 08-13-2009
cyberfish
Ah, thanks.

Excuse my ignorance, but I have gone through it quite a few times, and I still don't see an algorithm from it. I do understand all the algebra, though. Could you give me a few more hints?