Skip to content

Commit ba78d20

Browse files
committed
There is sometimes no stop value, use now
I think this is due to how the callbacks work. Needs more research.
1 parent 2e163fc commit ba78d20

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

miniprofiler.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,10 @@ function describePerformance(root, request) {
480480
}
481481

482482
function diff(start, stop){
483+
if (!stop) {
484+
stop = process.hrtime();
485+
console.error('missing stop, using', stop);
486+
}
483487
var deltaSecs = stop[0] - start[0];
484488
var deltaNanoSecs = stop[1] - start[1];
485489

0 commit comments

Comments
 (0)