Skip to content

sleepSync

Subhajit Sahu edited this page Aug 1, 2022 · 1 revision

Sleep for specified time.

Alternatives: sleep, sleepSync.


function sleepSync(ms)
// ms: time in milliseconds

const {sleepSync} = require('extra-sleep');


console.log('Turn on Alarm');
// → Turn on Alarm

sleepSync(1000);
console.log('Turn on Shower');
// → Turn on Shower (after 1s)


References

Clone this wiki locally