npm.io
1.1.9 • Published 6 years ago

@20i/timesync

Licence
ISC
Version
1.1.9
Deps
2
Size
17 kB
Vulns
0
Weekly
0

@20i/timesync

This library provides a way to get synchronized Time with a time server (20i time server by default)

import timesync from "@20i/timesync"

async function() {
    await timesync.sync({ delay: 50 })
    console.log("offsetMs", timesync.offsetMs)
    console.log("moment", timesync.now().toISOString())
}