@exodus/synchronized-time
v1.0.1
Published
Maintain externally synchronized time
Downloads
6,310
Readme
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-time
Usage
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()