@6du/sleep

Blocking sleep/delay with async/await

Usage no npm install needed!

<script type="module">
  import 6duSleep from 'https://cdn.skypack.dev/@6du/sleep';
</script>

README

await-sleep

Simple sleep with async/await

Installation

npm install --save await-sleep

Usage

import * as sleep from 'await-sleep';

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

  await sleep(1500);

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