mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
364 B
16 lines
364 B
14 years ago
|
console.log("wait...");
|
||
|
var done = 0;
|
||
|
var N = 5000000;
|
||
|
var begin = new Date();
|
||
|
for (var i = 0; i < N; i++) {
|
||
|
setTimeout(function () {
|
||
|
if (++done == N) {
|
||
|
var end = new Date();
|
||
|
console.log("smaller is better");
|
||
|
console.log("startup: %d", start - begin);
|
||
|
console.log("done: %d", end - start);
|
||
|
}
|
||
|
}, 1000);
|
||
|
}
|
||
|
var start = new Date();
|