[pve-devel] [PATCH widget-toolkit 4/4] format_duration_human: say <1s instead of 0s

Dominik Csapak d.csapak at proxmox.com
Fri Jun 12 13:29:27 CEST 2020


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

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/Utils.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Utils.js b/src/Utils.js
index 2163794..a914795 100644
--- a/src/Utils.js
+++ b/src/Utils.js
@@ -158,7 +158,7 @@ utilities: {
 	let seconds = 0, minutes = 0, hours = 0, days = 0;
 
 	if (ut <= 0) {
-	    return '0s';
+	    return '<1s';
 	}
 
 	let remaining = ut;
-- 
2.20.1





More information about the pve-devel mailing list