Updated msToTime function

This commit is contained in:
Christer Warén 2021-08-25 22:45:37 +03:00
parent ca494df400
commit d524649ad5

View File

@ -1,5 +1,5 @@
module.exports = function msToTime(duration) {
var seconds = Math.floor((duration / 1000) % 60),
let seconds = Math.floor((duration / 1000) % 60),
minutes = Math.floor((duration / (1000 * 60)) % 60),
hours = Math.floor((duration / (1000 * 60 * 60)) % 24),
days = Math.floor((duration / (1000 * 60 * 60 * 24)));