Created
June 3, 2024 12:02
-
-
Save alexsad/3bfa2bec838766f61cff756e9a3a147c 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
const sleep = (secs: number) => new Promise<NodeJS.Timeout>(success => { | |
const timeOutId = setTimeout(() => { | |
success(timeOutId); | |
}, secs * 1000); | |
}); | |
export { sleep }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment