Files
2016-04-05 11:42:41 +00:00
..
2016-04-05 11:42:41 +00:00
2016-04-05 11:42:41 +00:00
2016-04-05 11:42:41 +00:00
2016-04-05 11:42:41 +00:00
2016-04-05 11:42:41 +00:00
2016-04-05 11:42:41 +00:00
2016-04-05 11:42:41 +00:00
2016-04-05 11:42:41 +00:00
2016-04-05 11:42:41 +00:00
2016-04-05 11:42:41 +00:00

sleep

Add sleep() 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.usleep(n): sleep for n microseconds (1 second is 1000000 microseconds)