NodeGuy / server-date

Make the server's clock available in the browser.
http://www.nodeguy.com/serverdate/
Mozilla Public License 2.0
193 stars 53 forks source link

Using ServerDate to Sync Two Timers (Server and Browser) #29

Closed artforlife closed 8 years ago

artforlife commented 8 years ago

I have just come across this repository. Can it be used to sync two timers located on a NodeJS server and browser respectively? In particular, I am looking to do the following: the user starts the timer in the browser, which in turn starts the timer for the same period on the server. I can easily live with a ~0.1 - 1 sec discrepancy between the two. If the browser window is reloaded, I would like to pick up exactly where the server timer currently stands. There is also a mobile app that needs to sync with the same server timer.

Would you have any advice on an efficient way of getting it done?

NodeGuy commented 8 years ago

No, this library only synchronizes the browser with the server; there's no provision to initiate a timer from the browser. Good luck with your project.