Sleep with native spawn-sync
This is a toy! Not production code!
This project uses spawn-sync to call the native spawnSync function. If it is not available, then it creates a script file that will be executed. The polyfill will then poll for this script to complete with "busy waiting" - not really "idle" anymore.
Install this module with the following command:
npm install idle-sleep
Add the module to your package.json
dependencies:
npm install --save idle-sleep
Add the module to your package.json
dev-dependencies:
npm install --save-dev idle-sleep
var idleSleep = require('idle-sleep');
console.log('Start at ' + new Date());
idleSleep(1000);
console.log('Done at ' + new Date());
##Third-party libraries
The following third-party libraries are used by this module:
###Dependencies
##License
The MIT License
Copyright 2015 Marcel Erz