Meteor-Community-Packages / meteor-timesync

NTP-style time synchronization between server and client, and facilities to use server time reactively in Meteor applications.
https://packosphere.com/mizzao/timesync
MIT License
118 stars 36 forks source link

TimeSync.roundTripTime() not reactive? #15

Closed FickleLife closed 9 years ago

FickleLife commented 9 years ago

Sorry if this is a dumb question however in the docs it says TimeSync.roundTripTime() is reactive, however what I can see is it just says static when the page loads - do I need to put the call in a setInterval to make it reactive?

mizzao commented 9 years ago

It's definitely reactive - see https://github.com/mizzao/meteor-timesync/blob/master/timesync-client.js#L74.

It's not constantly reactive in that it doesn't update continuously while communicating with the server, but it is updated every once in a while.