diff options
Diffstat (limited to 'utils/numberUtils.js')
-rw-r--r-- | utils/numberUtils.js | 4 |
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) => { |