format_duration_human: say <0.1s instead of 0s

if we get a duration of <=0.1s it should actually be somewhere
betweeen 0 and 0.1 so return <0.1s

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-06-15 16:07:11 +02:00 committed by Thomas Lamprecht
parent b1d446d0b2
commit b2d7d422ec

View File

@ -157,8 +157,8 @@ utilities: {
format_duration_human: function(ut) {
let seconds = 0, minutes = 0, hours = 0, days = 0;
if (ut <= 0) {
return '0s';
if (ut <= 0.1) {
return '<0.1s';
}
let remaining = ut;