timesink
v2.0.2
Published
got a timeserver? get a kefir stream of times from it!
Downloads
3
Readme
timesink
got a timeserver? get a Kefir stream of times from it!
installation
npm install timesink
usage
first, set up a timeserver that returns a plain/text ISO date. (try timeserver!).
to issue a request to your timeserver every 500 ms:
var timesink = require('timesink')
var times = timesync('http://my-timeserver.zone', 500)
API
timesink(url, interval)
issues a GET request to url
every interval
ms. emits the response to the latest request, in case wires get crossed (see flatMapLatest