Skip to content

extra-sleep.web 0.0.24

Install from the command line:
Learn more about npm packages
$ npm install @nodef/extra-sleep.web@0.0.24
Install via package.json:
"@nodef/extra-sleep.web": "0.0.24"

About this version

Sleep for specified time.
πŸ“¦ Node.js, 🌐 Web, πŸ–₯️ Shell, πŸ“œ Files, πŸ“° Docs.

This provides both a synchronous and an asynchronous method for sleeping without doing a busy wait. The synchronous sleep is achieved using Atomics.wait() (1), and the asynchronous one is achived using Promisified setTimeout().

This package is available in Node.js, Web, and Shell formats. The web format is exposed as extra_sleep standalone variable and can be loaded from jsDelivr CDN.

Stability: Experimental.


const fyers = require('extra-sleep');


async function main() {
  console.log('Turn on Alarm');
  await sleep(1000);
  console.log('Turn on Shower');
}
main();


Index

Property Description
sleep Sleep for specified time (async).
sleepSync Sleep for specified time.


References



Details


Assets

  • extra-sleep.web-0.0.24-npm.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0