Skip to content

Instantly share code, notes, and snippets.

@huynhducduy
Created May 16, 2024 07:31
Show Gist options
  • Save huynhducduy/19086ba3acc584722b8ae2b8c025c94d to your computer and use it in GitHub Desktop.
Save huynhducduy/19086ba3acc584722b8ae2b8c025c94d to your computer and use it in GitHub Desktop.
blockSync
export default function blockSync(ms: number) {
const start = Date.now()
let now = start
while (now - start < ms) {
now = Date.now()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment