Package Exports
- set-harmonic-interval
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 (set-harmonic-interval) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
set-harmonic-interval
Works similar to setInterval, but calls all callbacks scheduled using setHarmonicInterval all at once, which have same
delay in milliseconds.
Install
npm install set-harmonic-intervalUsage
In below example 1 and 2 will always be printed together every second.
const { setHarmonicInterval, clearHarmonicInterval } = require('set-harmonic-interval');
setHarmonicInterval(() => console.log(1), 1000);
setTimeout(() => {
setHarmonicInterval(() => console.log(2), 1000);
}, 500);License
Unlicense — public domain.