Created
February 26, 2021 19:26
-
-
Save lrhache/99b5991c6febafb66457e3c54f18ff94 to your computer and use it in GitHub Desktop.
NodeJs Sleep function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sleep(n) { | |
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, n*1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment