A simple non-blocking sleep implementation
npm install nap-timeconst { sleep, usleep } = require('nap-time');
(async () => {
console.log('Do something');
await sleep(1); // One second
console.log('Do another thing');
await usleep(500); // 500ms
console.log('And done');
})();