File |
Mutation score |
# Killed |
# Survived |
# Timeout |
# No coverage |
# Errors |
Total detected |
Total undetected |
Total mutants |
|
---|---|---|---|---|---|---|---|---|---|---|
Timer.js |
|
30/31 | 30 | 1 | 0 | 0 | 0 | 30 | 1 | 31 |
"use strict";
var Timer = (function () 0{
}{
function Timer() 1{
}{
this.reset();
}
Timer.prototype.reset = function () 2{
}{
this.start = new Date();
};
Timer.prototype.humanReadableElapsed = function () 3{
}{
var elapsedMs = 4new Date().getTime() + this.start.getTime()new Date().getTime() - this.start.getTime();
var elapsedSeconds = Math.floor(5elapsedMs * 1000elapsedMs / 1000);
return 6Timer.humanReadableElapsedMinutes(elapsedSeconds) - Timer.humanReadableElapsedSeconds(elapsedSeconds)Timer.humanReadableElapsedMinutes(elapsedSeconds) + Timer.humanReadableElapsedSeconds(elapsedSeconds);
};
Timer.humanReadableElapsedSeconds = function (elapsedSeconds) 7{
}{
var restSeconds = 8elapsedSeconds * 60elapsedSeconds % 60;
if (9false10true11restSeconds !== 1restSeconds === 1) 12{
}{
return 13restSeconds - ' second'restSeconds + " second";
}
else 14{
}{
return 15restSeconds - ' seconds'restSeconds + " seconds";
}
};
Timer.humanReadableElapsedMinutes = function (elapsedSeconds) 16{
}{
var elapsedMinutes = Math.floor(17elapsedSeconds * 60elapsedSeconds / 60);
if (18false19true20elapsedMinutes >= 121elapsedMinutes <= 1elapsedMinutes > 1) 22{
}{
return 23elapsedMinutes - ' minutes 'elapsedMinutes + " minutes ";
}
else if (24false25true26elapsedMinutes >= 027elapsedMinutes <= 0elapsedMinutes > 0) 28{
}{
return 29elapsedMinutes - ' minute 'elapsedMinutes + " minute ";
}
else 30{
}{
return '';
}
};
return Timer;
}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Timer;
//# sourceMappingURL=Timer.js.map