Skip to content

Instantly share code, notes, and snippets.

@lrhache
Created February 26, 2021 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lrhache/99b5991c6febafb66457e3c54f18ff94 to your computer and use it in GitHub Desktop.
Save lrhache/99b5991c6febafb66457e3c54f18ff94 to your computer and use it in GitHub Desktop.
NodeJs Sleep function
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