1.0.0 • Published 5 years ago
sleepingdog v1.0.0
SleepingDog
There Are Two Kind of Sleep Here
- Promise Based
- Old Fashion Way
Both Sleep is Non Blocking
// Promise Way
async () => {
await sleep(2000); // 2000ms
};
Second Way is Old Fashion Settimeout Way
() => {
oldSleep(3000, () => console.log('Hey'));
};
Available For Both JavaScript & TypeScript
1.0.0
5 years ago