Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

synchronize clocks over internet

Tags:

tcp

latency

ntp

I am sending real-time-critical data over the internet between two dedicated computers, using my own protocol.

There is, of course, latency involved.

For debugging and optimization, I like to have both computers use the same timebase. I.e, I need to know the time difference of their clocks so that I can judge the latencies better.

Of course, relativism and such doesn't really allow me to sync them perfectly, but I like to get as close as possible.

Relying on NTP alone does not appear good enough - clocks can be off by half a second in my experience (clarification: I relied so far on the default one provided by Apple).

I need precision in the 1/10s range, at least. The two computers won't be too far apart, ICMP ping times are less than 100ms, usually.

Any suggestions how to do this?

(currently, the machines involved run OS X, so if you know a solution just for them, that'll be a start)

like image 582
Thomas Tempelmann Avatar asked Mar 03 '09 15:03

Thomas Tempelmann


People also ask

How does the cloud providers synchronize clocks?

Each of the physical devices that make up the cloud has a clock for synchronization and these clocks are synchronized to form a centralized clock for the cloud. Moreover, each of the virtualized logical devices in the cloud is synchronized according to the centralized clock.

What are the two methods used for time Synchronisation?

For a wired network, two methods of time synchronization are most common. Network Time Protocol and Global Positioning System (GPS) are both used for synchronization. Neither protocol is useful for wireless synchronization. Both require resources not available in wireless networks.

What are the ways for synchronizing clocks?

The clock synchronization can be achieved by 2 ways: External and Internal Clock Synchronization. External clock synchronization is the one in which an external reference clock is present. It is used as a reference and the nodes in the system can set and adjust their time accordingly.


1 Answers

Get the time from a GPS receiver connected to the machines. If they are in a data centre it can be difficult getting an antenna into a location that it can get a lock though unfortunately.

like image 96
andynormancx Avatar answered Oct 02 '22 01:10

andynormancx