const padZero = ( num , size ) => { let s = String ( num ) ; while ( s . length < size ) { s = `0${ s }` ; } return s ; } ; export const timeConvert = ( num ) => { const minutes = padZero ( Math . floor ( num / 1000 / 60 ) , 2 ) ; const seconds = padZero ( num % 60 , 2 ) ; return `${ minutes }:${ seconds }` ; } ; export const secondToTime = ( num ) => { const minutes = padZero ( Math . floor ( num / 60 ) , 2 ) ; const seconds = padZero ( num % 60 , 2 ) ; return `${ minutes }:${ seconds }` ; } ;