scTesterTemplate.js
// except that I don't know why he divides ms by 100
except that I don't know why he divides ms by 100
except that I don ' t know why he divides ms by 100
function msToTime(duration) {
    let ms = parseInt(duration % 1000);
    let sec = Math.floor((duration / 1000) % 60);
    let min = Math.floor((duration / (1000 * 60)) % 60);
    let hr = Math.floor((duration / (1000 * 60 * 60)) % 24);
    hr = hr < 10 ? '0' + hr : hr;
    min = min < 10 ? '0' + min : min;
    sec = sec < 10 ? '0' + sec : sec;
    return `${hr}:${min}:${sec}.${ms}`;
}
function msToTime ( duration ) { let ms = parseInt ( duration % 1000 ) ; let sec = Math . floor ( ( duration / 1000 ) % 60 ) ; let min = Math . floor ( ( duration / ( 1000 * 60 ) ) % 60 ) ; let hr = Math . floor ( ( duration / ( 1000 * 60 * 60 ) ) % 24 ) ; hr = hr < 10 ? '0' + hr : hr ; min = min < 10 ? '0' + min : min ; sec = sec < 10 ? '0' + sec : sec ; return ` ${ hr } ${ min } ${ sec } ${ ms } ` ; }
except that I don't know why he divides ms by 100
except that I don ' t know why he divides ms by 100