Skip to content

Instantly share code, notes, and snippets.

@bcalmac
Created September 4, 2020 23:38
Show Gist options
  • Save bcalmac/0a4ff831952fa3d35ac5a22eeb768a15 to your computer and use it in GitHub Desktop.
Save bcalmac/0a4ff831952fa3d35ac5a22eeb768a15 to your computer and use it in GitHub Desktop.
sleep function that can be used as "await sleep(1000)"
function sleep(ms) {
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