Created
October 9, 2019 10:36
-
-
Save sayanriju/b95d833a1f591dbacec83fa54d1f1ac1 to your computer and use it in GitHub Desktop.
Async Sleep Function
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(secs = 1) { | |
return new Promise(r => setTimeout(() => r(), secs * 1000)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment