Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 323 Bytes

File metadata and controls

27 lines (19 loc) · 323 Bytes

sleep

JavaScript sleep function

Install

Install with npm:

$ npm install --save time-sleep

Usage

import sleep from 'time-sleep'

const test = async function() {
  console.log(1)
  await sleep(1000)
  console.log(2)
  await sleep(1000)
  console.log(3)
}

test()