diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-09-10 14:08:39 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-09-10 14:08:39 -0700 |
commit | 3aff4a81981781a9cb58c466807d8aacc1aba428 (patch) | |
tree | db1958b86bd5afd18971f75635fa11c2695b1123 /tools/reproduceriter.py | |
parent | 5af206545f63c6e8c76cc09e0a34b4fdae2f417e (diff) |
reproduceriter fixes
Diffstat (limited to 'tools/reproduceriter.py')
-rwxr-xr-x | tools/reproduceriter.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/reproduceriter.py b/tools/reproduceriter.py index 4bbb59ea..51549e33 100755 --- a/tools/reproduceriter.py +++ b/tools/reproduceriter.py @@ -279,7 +279,8 @@ var Recorder = (function() { throw 'consuming too many values!'; } }; - recorder.pnow = performance.now || performance.webkitNow || performance.mozNow || performance.oNow || performance.msNow || dnow; + var pnow = performance.now || performance.webkitNow || performance.mozNow || performance.oNow || performance.msNow || dnow; + recorder.pnow = function() { return pnow.call(performance) }; performance.now = function() { if (recorder.pnows.length > 0) { return recorder.pnows.pop(); @@ -298,7 +299,7 @@ var Recorder = (function() { }; recorder.onFinish = []; // Benchmarking hooks - emscripten specific - (function() { + setTimeout(function() { var totalTime = 0; var iterations = 0; var maxTime = 0; @@ -316,7 +317,7 @@ var Recorder = (function() { console.log('mean frame: ' + (totalTime / iteratioins) + ' ms'); console.log('max frame : ' + maxTime + ' ms'); }); - })(); + }); // Finish recorder.finish = function() { recorder.onFinish.forEach(function(finish) { |