promise.sleep
npm i promise.sleep --save
const sleep = require('promise.sleep');
sleep(100).then(function(){
// blabla
});
const Green = require('promise.sleep').Green;
const green = new Green({
min: '1m',
max: '10m',
factor: '1m',
});
green.idle()
sleep a whilegreen.busy()
/green.reset()
reset tomin
the MIT License http://magicdawn.mit-license.org