await-sleep
Blocking sleep/delay with async/await
Last updated 3 years ago by sqren .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install await-sleep 
SYNC missed versions from official npm registry.

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
}

Current Tags

  • 0.0.1                                ...           latest (3 years ago)

1 Versions

  • 0.0.1                                ...           3 years ago

Copyright 2014 - 2016 © taobao.org |