wtimer
v1.0.4
Published
very light and fast setInterval implementation with using Web-Workers to keep up and running on inactive tabs for Browsers
Downloads
4
Readme
Getting Started
npm install wtimer
Example
import createInterval from 'wtimer';
// init
const wtimer = createInterval(10); // 10ms interval in worker
// set interval
const p = wtimer.setInterval(() => {
console.log('Hello World');
}, 1000);
// clear interval
wtimer.clearInterval(p);
// clear all interval
wtimer.terminate();