Created
April 25, 2023 16:47
-
-
Save Fredkiss3/1bbdd4c162e7a07efdfe74e2e9ba7aac to your computer and use it in GitHub Desktop.
a simple utility function for waiting a certain amount of time, in TS
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
export function wait(ms: number): Promise<void> { | |
// Wait for the specified amount of time | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment