Skip to content

Instantly share code, notes, and snippets.

@bjornstar
Forked from isaacs/s.js
Last active December 15, 2015 06:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjornstar/5217894 to your computer and use it in GitHub Desktop.
Save bjornstar/5217894 to your computer and use it in GitHub Desktop.
var assert = require('assert');
var c = 0;
test();
function test() {
var d1 = Date.now()
setTimeout(function() {
var d2 = Date.now()
var dd = d2 - d1;
assert(dd >= 2, 'expected at least 2, got ' + dd);
++c;
if (c % 1000 === 0)
console.log(c);
var b = {};
for (var i = 0; i < 100000; i += 1) {
b[i] = Math.round(Math.random()*400);
}
test();
}, 2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment