0.0.11 • Published 5 months ago

@jrc03c/pause v0.0.11

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

Intro

An asynchronous pause function

Installation

npm install --save @jrc03c/pause

Usage

import { pause } from "@jrc03c/pause"

pause(1000).then(elapsed => {
  console.log(`${elapsed} milliseconds have elapsed!`)
})

API

pause(ms)

Given a number of milliseconds, ms, for which to pause, returns a Promise that resolves to a number indicating how many milliseconds have actually elapsed since the function was called.