Last active
September 10, 2020 16:21
-
-
Save supermarsx/d69e4d39f17e056529b4f220c91ebe67 to your computer and use it in GitHub Desktop.
Delays script execution for a given amount of milliseconds
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
/* | |
delayScript | |
Delays script execution | |
parameters | |
time (integer) - Time to delay scripts execution | |
*/ | |
async function delayScript(time) { | |
return new Promise(function(resolve) { | |
setTimeout(resolve, time); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment