Created
January 15, 2021 01:50
-
-
Save nafeu/bc440ae5f6ebe65bed4e509d5a6db425 to your computer and use it in GitHub Desktop.
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
function delay(delayedFunction, time) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve(delayedFunction()); | |
}, time); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment