Permalink
Browse files

Build new PEG.js examples.

  • Loading branch information...
1 parent 83408a4 commit ffbabdeb7ea915396058f14a7d4646cf14130a33 @jcoglan committed Apr 29, 2012
View
@@ -1,7 +1,7 @@
-benchmark = function(name, n, block) {
+module.exports = function(name, n, block) {
var start = Number(new Date), i = n;
while (i--) block();
- var end = Number(new Date);
- print(name + ': ' + n + 'x :: ' + ((end - start) / 1000) + 's');
+ var t = (Number(new Date) - start) / 1000;
+ console.log(name + ': ' + n + 'x :: ' + t + 's');
};
Oops, something went wrong.

0 comments on commit ffbabde

Please sign in to comment.