Fix "process.hrtime() only accepts an Array tuple." error. - #922
Conversation
|
Thanks! That's weird – what version of Node is that with? On Node 6, Rather than redefining time = function time ( previous ) {
if ( previous ) {
const hrtime = process.hrtime( previous );
return hrtime[0] * 1e3 + hrtime[1] / 1e6;
}
return process.hrtime();
}; |
|
It's Node 4. It seems rather odd to me to have one function do pretty much unrelated things depending on whether or not you pass it an argument. I'm not sure what to call the split-up |
|
Alright, I split up |
|
LGTM, thanks 👍
I agree, but the Node.js people apparently don't 😀 I guess we were just following their lead |
|
Released 0.35.7 |
I was upgrading the version of Rollup used by gulp-rollup when suddenly almost all of my tests started failing on Travis with the error
process.hrtime() only accepts an Array tuple..Turns out Rollup had been updated again while I was working, introducing this error. Tracking that down was fun. So here's a fix—enjoy.