[pve-devel] [PATCH widget-toolkit v2 4/4] format_duration_human: say <0.1s instead of 0s
Dominik Csapak
d.csapak at proxmox.com
Mon Jun 15 16:07:11 CEST 2020
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 at proxmox.com>
---
changes from v1:
* change <1s to <0.1s which is more inline with our normal display (e.g. 1.5s)
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;
--
2.20.1
More information about the pve-devel
mailing list