diff options
author | Mango0x45 <thomasvoss@live.com> | 2021-02-05 21:58:27 +0100 |
---|---|---|
committer | Mango0x45 <thomasvoss@live.com> | 2021-02-05 21:58:27 +0100 |
commit | c845018e93b526010a2345b647dc3c5cdb0432d9 (patch) | |
tree | 0e38dc0f4e217faef4945ef5e228c816aae69e17 | |
parent | 3ca1d00c7bd9d3a31261a44560a38cadb5361698 (diff) |
Add trailing 0's on full second times
-rw-r--r-- | main.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; } |