https://github.com/elsehow/sank
two Bacon functions for syncing with a timeserver
https://github.com/elsehow/sank
Last synced: about 1 year ago
JSON representation
two Bacon functions for syncing with a timeserver
- Host: GitHub
- URL: https://github.com/elsehow/sank
- Owner: elsehow
- Created: 2015-04-20T01:10:43.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-09T05:10:23.000Z (about 11 years ago)
- Last Synced: 2025-03-17T01:07:33.795Z (over 1 year ago)
- Language: CoffeeScript
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sank
A function for syncing with a timeserver using a Bacon property.
Only tested in the browser so far. Requires `$` to be bound to jquery.
### sank (timeServerURL, updateTimeInterval)
Returns a Bacon property representing the time diff (in ms) between client time and the timeserver. the property requests sends a request to timeServerURL every updateTimeInterval
`timeServerURL` must return an ISO-formatted date on a GET request.