await-sleep

Blocking sleep/delay with async/await

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
await-sleep
4000.0.15 years ago5 years agoMinified + gzip package size for await-sleep in KB

Readme

await-sleep
Blocking delay with async/await

Installation

npm i --save await-sleep

Usage

import sleep from 'await-sleep'

async function myAsyncFunction() {
  console.time('Sleeping');

  await sleep(1500);

  console.timeEnd('Sleeping'); // Sleeping: 1507.180ms
}