output of this code is always getting delayed by 25-30 milliseconds. Why?
i tried same using Webworker, even then output was delayed. How to fix this issue?
I want almost perfect output for the following code.
var j = 0;
var start = Date.now();
setInterval(function() {
j++;
if (j % 10 == 0) {
var end = Date.now();
console.log(end - start);
}
}, 50);