Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

sleep

5.1.1 • Public • Published

sleep

Add sleep(), msleep() and usleep() to Node.js, via a C++ binding.

This is mainly useful for debugging.

These calls will block execution of all JavaScript by halting Node.js' event loop!

Usage

var sleep = require('sleep');
  • sleep.sleep(n): sleep for n seconds
  • sleep.msleep(n): sleep for n miliseconds
  • sleep.usleep(n): sleep for n microseconds (1 second is 1000000 microseconds)

Keywords

install

npm i sleep

Downloadsweekly downloads

20,949

version

5.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar