Skip to content

Instantly share code, notes, and snippets.

@xk xk/debugger.js
Created Dec 18, 2010

What would you like to do?
// 2010-12-16
// loopFreq.js displays event loop tick period in ms and KHz
// with debugger; slows down to a crawl !
var k_ms= 1e3;
setTimeout(function display () {
console.log(["ctr: ",ctr, ", t:", t, "ms -> ", (ctr/t).toFixed(2), "KHz"].join(''));
setTimeout(display, k_ms);
ctr= 0;
t= 2;
while (t > ; //get in sync with clock
}, k_ms);
var ctr= 0;
var t= 2;
while (t > ; //get in sync with clock
(function foo () {
debugger; // this is the problem !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.