Created
September 4, 2020 23:38
-
-
Save bcalmac/0a4ff831952fa3d35ac5a22eeb768a15 to your computer and use it in GitHub Desktop.
sleep function that can be used as "await sleep(1000)"
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(ms) { | |
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