Created
August 14, 2014 12:09
-
-
Save spion/9e382999346c0880f1b1 to your computer and use it in GitHub Desktop.
This file contains 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
var Timer = process.binding('timer_wrap').Timer; | |
function test(r) { | |
return function() { | |
console.log(r, Timer.now()); | |
} | |
} | |
function run() { | |
for (var k = 0; k < 10; ++k) { | |
var r = Math.random() * 10; | |
setTimeout(test(r), r) | |
} | |
} | |
setInterval(run, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment