aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-09-14 18:08:15 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-09-14 18:08:15 +0800
commitd8d3294e243470c35de81a73678689dc504f111f (patch)
treefe5f671ebe0991e8f684104cb4a0abe4c82f7eee /utils
parent1d1e158e24a68a5fc719c936b4cc6c3b7ada30b2 (diff)
parent3f3a0dcefa3361e9f5688a4c9565308323fade6b (diff)
downloadSoopyV2-d8d3294e243470c35de81a73678689dc504f111f.tar.gz
SoopyV2-d8d3294e243470c35de81a73678689dc504f111f.tar.bz2
SoopyV2-d8d3294e243470c35de81a73678689dc504f111f.zip
Merge branch 'master' of https://github.com/Soopyboo32/SoopyV2
Diffstat (limited to 'utils')
-rw-r--r--utils/numberUtils.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/numberUtils.js b/utils/numberUtils.js
index 327f875..8d5e7c3 100644
--- a/utils/numberUtils.js
+++ b/utils/numberUtils.js
@@ -86,9 +86,9 @@ let utils = {
},
timeNumber: (time, secondDecimals = 0) => {
let mins = Math.floor(time / 1000 / 60)
- let secs = Math.floor(time / 1000) % 60
+ let secs = (time / 1000) % 60
- if (mins === 0) return secs + "s"
+ if (mins === 0) return `${secs.toFixed(secondDecimals)}s`
return `${mins}m ${secs.toFixed(secondDecimals)}s`
},
timeNumber2: (time) => {