Nocturnally Psychologizing Millipede
Miss any of our Open RFC calls?Watch the recordings here! »

set-accurate-timeout

1.0.1 • Public • Published

Sets an accurate timeout that respects date, and the result can't be less than the specified amount of milliseconds. Implemented by recursive execution of native setTimeout. The error is about 10ms.

Install package

npm install set-accurate-timeout

Install dependencies and build library

  • Install dependencies

    npm install

  • Run tests

    npm run test

Usage example

const setAccurateTimeout=require('set-accurate-timeout')
setAccurateTimeout(() => {
  console.log('So, 5s have passed.')
}, 5000)

Install

npm i set-accurate-timeout

DownloadsWeekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

2.68 kB

Total Files

5

Last publish

Collaborators

  • avatar