Created
June 19, 2021 20:37
-
-
Save ShapeGroup/952b6be07f0a73b88a4d6e1c5d48dd6f to your computer and use it in GitHub Desktop.
js-kit-wait
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
//// JS KIT - WAIT A TIME | |
//// MIT LICENCE | |
//// Credit: alberto marà | |
// how to use: | |
// wait(3000); | |
const wait = (ms) => { | |
let start = new Date().getTime(), | |
end = start; | |
while (end < start + ms) { | |
end = new Date().getTime(); | |
} | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment