ut-function.timing
v1.2.0
Published
Time intervals and high resolution time helpers
Readme
ut-function.timing
Time intervals and high resolution time helpers, browser compatible
Usage
const {diff, after, isAfter, now, spare} = require('ut-function.timing')Where
diff(time1, time2)- difference in milliseconds between two high resolution time valuestime1andtime2after(interval)- get local high resolution time value after specified timeintervalin millisecondsisAfter(time, timeout)- check if high resolutiontimeis after high resolution valuetimeoutnow- get curren time as high resolution valuespare(time, latency)- get remaining time between current time and passedtime, minus the optional expected network or otherlatency
