Created
December 28, 2018 15:21
-
-
Save jportella93/136e54cf8f97787a4f69177dd719216b to your computer and use it in GitHub Desktop.
Pause execution of script.
This file contains hidden or 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
// E.G. await sleep(1000) | |
function sleep(ms) { | |
if (ms < 0) ms = 0 | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment