@rweich/webworker-timer
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

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);

Package Sidebar

Install

npm i @rweich/webworker-timer

Weekly Downloads

1

Version

2.0.2

License

MIT

Unpacked Size

7.88 kB

Total Files

6

Last publish

Collaborators

  • rweich