Tech-Demo: Syncing Clocks

Demo of my server synced real time clock with a lot of colors.I am currently working on a small project for MESO Web Scapes that involves synchronizing independent browser windows (may also extend to independent devices and platforms). I prepared a tiny demo that contains the gist of that synchronisation.

Even if you set your system’s clock automatically from a high-precision source, there may be a slight difference across devices as clocks tend to drift. My smartphone, for example, experiences a drift of 200ms per day. This is usually not a problem, this would amount to 73 seconds drift over the period of a year and is by all human standards still a reasonably correct time.

In our project, we were aiming for a sub-100ms-difference across devices. That’s why implemented an NTP-Like synchronisation that uses node.js, and a slightly modified version of socket-kinda-ntp. Open the demo on a few devices, if you can. You should see a colourful background that changes every second (colors come directly from the Solarized color scheme).

If you would like to contribute to a tiny survey of clock accuracy, feel free to click the link at the bottom, this will record your clock’s offset. If this yields any interesting information, i will write a follow-up blogpost about it.

Comments are closed. Please feel free to Contact me directly!


Claudius Coenen is a tech-enthusiast. He's writing on all kinds of topics, including programming, technology, gadgets and media.

This site features his occasional articles, findings, documentations.



RSS Recent Bookmarks