Created
June 25, 2019 16:11
-
-
Save fauxsaurus/12c401b3befb00e904eb5c155665ca08 to your computer and use it in GitHub Desktop.
A simple wait/sleep command in JavaScript.
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
await new Promise(done=>setTimeout(done,seconds*1000)) | |
//note: replace "seconds" with a number to use this | |
//hint: this will only work inside an async function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment