Always interpret negative duration as 0.

Negative durations, especially for print time left, might arise if estimation is estimating less than current print time. So we just erase that margin of error in the UI.

Closes #435
This commit is contained in:
Gina Häußge 2014-04-18 14:21:27 +02:00
parent 9ab4fa608a
commit 73f0b9dabd

View file

@ -293,6 +293,7 @@ function formatSize(bytes) {
function formatDuration(seconds) {
if (!seconds) return "-";
if (seconds < 0) return "00:00:00";
var s = seconds % 60;
var m = (seconds % 3600) / 60;