aboutsummaryrefslogtreecommitdiff
path: root/src/utility.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/utility.js')
-rw-r--r--src/utility.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/utility.js b/src/utility.js
index 5019e117..632ee08c 100644
--- a/src/utility.js
+++ b/src/utility.js
@@ -319,11 +319,12 @@ function Benchmarker() {
//printErr(['+', id, starts[id]]);
starts[id] = (starts[id] || []).concat([Date.now()]);
};
- this.end = function(id) {
+ this.stop = function(id) {
//printErr(['-', id, starts[id]]);
assert(starts[id], new Error().stack);
times[id] = (times[id] || 0) + Date.now() - starts[id].pop();
counts[id] = (counts[id] || 0) + 1;
+ this.print();
};
this.print = function() {
var ids = keys(times);