Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nafeu/bc440ae5f6ebe65bed4e509d5a6db425 to your computer and use it in GitHub Desktop.
Save nafeu/bc440ae5f6ebe65bed4e509d5a6db425 to your computer and use it in GitHub Desktop.
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