- Code Format Refactor
- Changed Deps to Tracker (#49)
- Only show log output if running in development
- Added _timeSync Meteor Method for doing timesync over DDP instead of HTTP
- Auto switch to DDP after initial HTTP timesync to improve subsequent round trip times
- Added option TimeSync.forceDDP to always use DDP, even for first sync (which may be slow!)
- Shortened resync interval from 1 minute to 30 seconds when using DDP.
- Added tests for DDP and HTTP sync
- Added option to set the timesync URL using
TimeSync.setSyncUrl
- Removed IE8 compat function
- Added compatibility for Meteor 3.0-beta.7
- Adding CORS compatibility for Ionic capacitorjs
- Bump minimum Meteor version to 1.12
- Take into account
ROOT_URL
environment variable if set
- Travis CI NodeJS environment updated to use Node 12 and 14
- Updated package resolution to work for Meteor 2.3
- Fix an issue where
TimeSync.ServerTime
returned NaN when executed in meteor-desktop.
- guess new offset instead of unsetting if the client time has changed. This prevents that
TimeSync.serverTime
returnsundefined
after the time has changed and the client isn't in sync with the server.
- Update CORS headers to support Meteor 1.3. (#37, #41)
- Support Meteor apps running in sub-paths instead of at root level. (#36, #40)
- Explicitly pull in client-side
check
for Meteor 1.2 apps.
- Be more robust with sync url when outside of Cordova. (#30)
- Fix issue when used in Cordova. (#22, #26, #27)
- Fix an issue where
TimeSync.serverTime
returned an erroneous value when passed aDate
(instead of an epoch). (#23)
TimeSync.serverTime
now supports an optional secondupdateInterval
argument, causing the reactive value to update less frequently. (#10)TimeSync.loggingEnabled
can be now set to false to suppress client log output. (#21)- Explicitly set MIME type on timesync endpoint. (#17, #18)
- Updated for Meteor 0.9.
- Further adjust clock watching tolerance to be less sensitive to CPU.
- Re-sync automatically after a reconnection.
- Adjust clock watching tolerance so as to be less sensitive to heavy client CPU usage.
- Clock change watching is now on by default (it's very lightweight and only involves grabbing and checking a
Date
). - Invalidate offset value and dependent time computations when we detect a clock change.
- Added a
Date.now
shim for earlier versions of IE. - Reorganized code for testing and added some basic tests.
- Added the optional
TimeSync.watchClockChanges
which can resync if a client's clock is detected to have significantly changed. - Added retry attempts to syncing, making it more robust over a hot code reload among other situations.
- Use
WebApp.rawConnectHandlers
as a less janky way of getting our date request handled first. - Fixed an issue where a cached reload could result in a wacky time offset due to the server time being cached.
- Switch to JS at the request of @raix and @arunoda ;-)
- Use a middleware handler, spliced into the top of the connect stack, instead of a Meteor method to avoid arbitrary method blocking delay. This improves accuracy significantly.
- Compute a RTT value in
TimeSync.roundTripTime
as well as a time offset.
- Ensure that the computed offset is always an integer number of milliseconds.
- Added the
TimeSync.resync
function that triggers a resync with the server.
- Added the reactive function
TimeSync.isSynced
to determine if an initial sync has taken place.
- First release.