Created
June 1, 2022 07:48
-
-
Save pavarov/c8e0fa487abb3ad043f33429337e6eac to your computer and use it in GitHub Desktop.
js sleep function
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
function sleep(ms: number) { | |
return new Promise(resolve => window.setTimeout(resolve, ms)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment