Skip to content

clarkey/await-sleep

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

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
}

About

Delay with async/await

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%