Skip to content

sorenlouv/await-sleep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

66ff0a8 · Jan 13, 2022

History

6 Commits
Aug 17, 2017
Jan 13, 2022
Oct 8, 2019

Repository files navigation

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
}