- getSplitDuration now returns the correct time
pull/33/head
Trivernis 6 years ago
parent 60366de6b3
commit f8a765799e

@ -104,13 +104,13 @@ exports.getSplitDuration = function (duration) {
let dur = duration;
let retObj = {};
retObj.milliseconds = dur % 1000;
dur = Math.round(dur / 1000);
dur = Math.floor(dur / 1000);
retObj.seconds = dur % 60;
dur = Math.round(dur / 60);
dur = Math.floor(dur / 60);
retObj.minutes = dur % 60;
dur = Math.round(dur / 60);
dur = Math.floor(dur / 60);
retObj.hours = dur % 24;
dur = Math.round(dur / 24);
dur = Math.floor(dur / 24);
retObj.days = dur;
return retObj;
};
@ -272,4 +272,4 @@ exports.logLevels = {
'warning': 3,
'warn': 3,
'error:': 4
};
};

@ -13,13 +13,13 @@ function getSplitDuration (duration) {
let dur = duration;
let retObj = {};
retObj.milliseconds = dur % 1000;
dur = Math.round(dur / 1000);
dur = Math.floor(dur / 1000);
retObj.seconds = dur % 60;
dur = Math.round(dur / 60);
dur = Math.floor(dur / 60);
retObj.minutes = dur % 60;
dur = Math.round(dur / 60);
dur = Math.floor(dur / 60);
retObj.hours = dur % 24;
dur = Math.round(dur / 24);
dur = Math.floor(dur / 24);
retObj.days = dur;
return retObj;
}

Loading…
Cancel
Save