snoozely
v0.0.2
Published
A sleep module for nodejs
Downloads
2
Readme
Snoozely
A sleep
function for nodejs!
Usage
For asynchronous function
console.log("Dozing off, Zzzzz");
await require("snoozely").snoozely(10000); //sleep for 10sec
console.log("Awake now!");
For synchronous function
console.log("Dozing off, Zzzzz");
//sleep for 10sec
require("snoozely").snoozelySync(10000, ()=>{
console.log("Awake now!");
});