Skip to content

Instantly share code, notes, and snippets.

@shpiyu
Created November 6, 2022 05:30
hang js
function hang(secs) {
const doneAt = Date.now() + secs * 1000
while (Date.now() < doneAt) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment