1.0.4 • Published 6 years ago

msleep v1.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

msleep

Small function that mimics the usleep C function, blocking the main thread. But instead of microseconds works with miliseconds, to feel more JS-like.

Useful for:

  • Debugging race conditions
  • Simulate blocked UI thread on the browser

Installation

npm install --save msleep

Usage

msleep(5000) // Will block the main thread for half a second

caiogondim.com  ·  GitHub @caiogondim  ·  Twitter @caio_gondim

1.0.4

6 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

9 years ago

1.0.0

9 years ago