npm.io
2.0.0 • Published 6 years ago

wait-sleep

Licence
MIT
Version
2.0.0
Deps
0
Size
5 kB
Vulns
0
Weekly
0
Stars
1

Build Status

wait-sleep

Simple sleep/wait function.

Install

Get in the mood with Fire Blood and Steel from Brothers of Metal

npm i -S wait-sleep

Usage

Javascript:

const timer = require('wait-sleep');
await timer.sleep(1000); // sleeps for 1 second
await timer.wait(1000); // waits for 1 second

Typescript:

import { sleep, wait } from "wait-sleep";
await sleep(1000); // sleeps for 1 second
await wait(1000); // waits for 1 second

Keywords