@rweich/webworker-timer
v2.0.2
Published
timers running inside webworkers
Downloads
9
Maintainers
Readme
webworker-timer
Timers running inside webworkers.
- no dependencies
Usage
This package exposes the following methods:
- setTimeout
- setInterval
- clearTimeout
- clearInterval
Just import the methods and use them like usual.
import { clearInterval, setInterval } from '@rweich/webworker-timer';
const interval = setInterval(
() => console.log('interval called'),
500
);
clearInterval(interval);