node-wait

A node module to block js thread for given time

Usage no npm install needed!

<script type="module">
  import nodeWait from 'https://cdn.skypack.dev/node-wait';
</script>

README

node-wait

Provide a function to block js thread for given time.

const wait = require('node-wait')

const start = Date.now()
wait(1000)

console.log(Date.now() - start)
// 1003