Skip to content

Instantly share code, notes, and snippets.

@AntoineDrouhin
Created November 7, 2019 09:48
Show Gist options
  • Save AntoineDrouhin/570d2398abca18d7b793fe7b72124ac9 to your computer and use it in GitHub Desktop.
Save AntoineDrouhin/570d2398abca18d7b793fe7b72124ac9 to your computer and use it in GitHub Desktop.
Sleep
// usage : await sleep(1000)
function sleep(milliseconds: number) {
return new Promise(resolve => setTimeout(resolve, milliseconds))
}
export { sleep }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment