Package Exports
- rolex
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rolex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rolex

Drift-minimizing setInterval replacement and high-precision timer utility for Node and browser

How it works
To ensure maximal accuracy compared with setTimeout, Rolex calls setTimeout in advance of the requested timeout, then checks how close the requested timeout
is. It does this recursively until the timeout is reached within a given
threshold. Both the aggression and threshold are user-configurable.
Installation
In Node: npm install rolex
In browser:
- Copy
rolex.jsorrolex.min.js(with optional source map atrolex.min.js.map) <script src="path/to/rolex.{min.}js"></script>setIntervalandclearIntervalare automatically replaced -- if this is undesired,Rolex.noConflict();
Usage
var Rolex = require('rolex')
var r = Rolex(10, () => {
console.log('executes in 10 ms')
}).start()More examples in test/rolex.js.