Skip to content

Commit 1e8c2da

Browse files
committed
Use process.hrtime() when stop is undefined
1 parent f97a3e9 commit 1e8c2da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/miniprofiler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ function describePerformance(root, request) {
406406
}
407407

408408
function diff(start, stop){
409-
if (!start || !stop) {
410-
return 0;
409+
if (!stop) {
410+
stop = process.hrtime();
411411
}
412412

413413
var deltaSecs = stop[0] - start[0];

0 commit comments

Comments
 (0)