Last active
December 13, 2019 23:24
-
-
Save Smidgens/fb46b000de18f1d53962e4916f768649 to your computer and use it in GitHub Desktop.
Returns a promise object that triggers a callback in x seconds.
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
const waitSeconds = (sec) => { | |
return new Promise((resolve, _reject) => { | |
setTimeout(resolve, 1000 * sec) | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment