From b2d7d422ecd76aa5a8e98c80414085065fa6a2d5 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Mon, 15 Jun 2020 16:07:11 +0200 Subject: [PATCH] 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 --- src/Utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Utils.js b/src/Utils.js index 2163794..b5b1acb 100644 --- a/src/Utils.js +++ b/src/Utils.js @@ -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;