Created
April 1, 2018 19:12
-
-
Save T1T4N/e064845854d4b1a4b3056490bf56a580 to your computer and use it in GitHub Desktop.
A timeout function to be used with async/await
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
function timeout(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