1.0.1 • Published 1 year ago
@exodus/synchronized-time v1.0.1
SynchronizedTime
The purpose of this module is to maintain externally synchronized time and provide
the now() function that returns that time.
Install
yarn add @exodus/synchronized-timeUsage
import { SynchronizedTime } from '@exodus/synchronized-time'
console.log(SynchronizedTime.now())The module can be used with Date like this:
const syncedDate = new Date(SynchronizedTime.now())
or instead of Date.now():
const syncedNow = SynchronizedTime.now()