1.0.20 ā€¢ Published 1 year ago

extra-sleep.web v1.0.20

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Sleep for specified time. šŸ“¦ Node.js, šŸŒ Web, šŸš Shell, šŸ“œ Files, šŸ“° Docs, šŸ“˜ Wiki.

sleep is a command in Unix-like operating systems that suspends program execution for specified time. This provides both a synchronous and an asynchronous method for sleeping without doing a busy wait. The synchronous sleep is achieved using Atomics.wait(), and the asynchronous one is achived using Promisified setTimeout().

This package is available in Node.js and Web formats. To use it on the web, simply use the extra_sleep global variable after loading with a <script> tag from the jsDelivr CDN.

Stability: Experimental.

const {sleep} = require('extra-sleep');
// import {sleep} from "extra-sleep";
// import {sleep} from "https://unpkg.com/extra-sleep/index.mjs"; (deno)


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

Index

PropertyDescription
sleepSleep for specified time (async).
sleepSyncSleep for specified time.

References

npm.io ORG DOI Coverage Status Test Coverage Maintainability

1.0.19

1 year ago

1.0.18

1 year ago

1.0.20

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.2

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.12

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.30

2 years ago

0.0.29

2 years ago

0.0.28

2 years ago

0.0.27

2 years ago

0.0.26

2 years ago

0.0.25

2 years ago

0.0.24

2 years ago

0.0.23

2 years ago

0.0.22

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago