sleepingdog
v1.0.0
Published
Async Sleep Utility
Downloads
1
Maintainers
Readme
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