Skip to content

Instantly share code, notes, and snippets.

@georgebearden
Created January 11, 2019 02:06
Show Gist options
  • Save georgebearden/c19f48851e85ce7fbc86284051876989 to your computer and use it in GitHub Desktop.
Save georgebearden/c19f48851e85ce7fbc86284051876989 to your computer and use it in GitHub Desktop.
function sleep(millis) {
var start = new Date().getTime();
while ((new Date().getTime() - start) <= millis) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment