diff options
author | Mango0x45 <thomasvoss@live.com> | 2021-02-06 16:32:23 +0100 |
---|---|---|
committer | Mango0x45 <thomasvoss@live.com> | 2021-02-06 16:32:23 +0100 |
commit | 8c8750641cd0c0f129ece28764f2ac58a2db7933 (patch) | |
tree | 2403cddd8771434b5cec558ce43f89ad2a8c9720 | |
parent | 85adda024d3207af26f12f5f8e2cdc2df1c349ec (diff) |
More efficient time formatting
-rw-r--r-- | main.js | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -35,14 +35,7 @@ function time_format(t) if (h > 0) ret += h + ":" + (m < 10 ? "0" : ""); - ret += m + ":" + (s < 10 ? "0" : ""); - ret += s; - - /* Milliseconds */ - if (t % 1 == 0) - ret += "." + t.toFixed(3).split(".")[1]; - else - ret += ".000"; + ret += m + ":" + (s < 10 ? "0" : "") + s.toFixed(3); return ret; } |