Yet another synchronizable clock
$ npm install hodiny
const { Clock } = require("hodiny");
const clock = new Clock({
fetchTime() {
// Fetch the current time from your source of truth...
},
});
clock.ready.then(() => {
console.log(clock.now());
});
Alexandre Breteau - @0xSeldszar
MIT © Alexandre Breteau