Created
March 22, 2019 08:08
-
-
Save devarajchidambaram/9f7955bf929a52fd7ab936f47c505e4c to your computer and use it in GitHub Desktop.
Block event loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const els = require('event-loop-stats') | |
console.log(els.sense()) | |
const end = Date.now() + 50 | |
setTimeout(() => { | |
console.log(els.sense()) | |
}, 100) | |
while (Date.now() < end) {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment