Skip to content

Instantly share code, notes, and snippets.

@think2011
Created Apr 15, 2017
Embed
What would you like to do?
while sleep
const sleep = (n) => {
let start = Date.now()
while(true) if (Date.now() - start > n) break
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment