Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 400 Bytes

README.md

File metadata and controls

23 lines (17 loc) · 400 Bytes

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!");
});