2

I am running some benchmarks between a Windows client and Linux server. In order to measure the latency correctly I need to synchronize the clocks between the two machines before starting the test - ideally down to the nearest millisecond - what's the easiest way to achieve this?

I don't need to do this repeatedly, just once manually, so it doesn't need to be always in sync or automated.

Supertux
  • 131

5 Answers5

15

Make both machines be NTP clients. That should make their clocks correct to within a rather short interval, and is already developed, tested, and available.

According to the Wikipedia page on NTP, you should expect around 10 ms over Internet, far less if you have a local time server on your LAN, which should be quite easy to set up.

unwind
  • 344
4

Probably belongs on serverfault, but you're looking for ntp (Network Time Protocol). The daemon on linux is ntpd, and I think it's "Windows Time Service Tools" on windows.

Mr_Pink
  • 1,934
3

Just something to watch out for...may not practically apply if the test you're doing is fairly short in duration:

Be aware of the time synchronization interval, especially if the Windows client is in a domain (where the domain source and interval would override anything you set manually for your test).

It might muddy your results if you sync the times manually and one or both of the machines being measured re-synch their times from another source while the benchmark is running.

damorg
  • 1,266
1

I think Samba may act as a time server which can be used with net time on Windows clients.

wRAR
  • 292
0

If You need atomic time you can try to find solution in this question

adopilot
  • 1,541