Created
December 14, 2018 02:24
-
-
Save tag1216/fa0afa09f1a6c4f577ed906220bf7575 to your computer and use it in GitHub Desktop.
Javascript sleep
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
async function sleep(msec: number) { | |
return new Promise(resolve => setTimeout(resolve, msec)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment