Calling process.hrtime is predicated on being called with

an Array type with two elements or with no explicit parameters.

Node 4 (LTS) seems to be persnickety regarding matching undefined as a
actual parameter in process.hrtime (and possibly all functions).
This commit is contained in:
Chris Kleeschulte 2016-08-11 22:07:13 -04:00
parent e59fe9bf6d
commit 13cfd8aa43

View File

@ -403,7 +403,8 @@ utils.hrtime = function hrtime(time) {
return [sec, ms * 1e6];
}
return process.hrtime(time);
return Array.isArray(time) && time.length == 2 ?
process.hrtime(time) : process.hrtime();
};
/**