aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMango0x45 <thomasvoss@live.com> 2021-02-05 21:58:27 +0100
committerMango0x45 <thomasvoss@live.com> 2021-02-05 21:58:27 +0100
commitc845018e93b526010a2345b647dc3c5cdb0432d9 (patch)
tree0e38dc0f4e217faef4945ef5e228c816aae69e17
parent3ca1d00c7bd9d3a31261a44560a38cadb5361698 (diff)
Add trailing 0's on full second times
-rw-r--r--main.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.js b/main.js
index fd77355..f021e88 100644
--- a/main.js
+++ b/main.js
@@ -40,7 +40,9 @@ function time_format(t)
/* Milliseconds */
const st = t.toString();
if (!isNaN(t) && st.indexOf(".") != -1)
- ret += "." + st.split(".")[1];
+ ret += "." + st.split(".")[1].toFixed(3);
+ else
+ ret += ".000"
return ret;
}