1 define(['../math/countSteps', '../number/pad'], function(countSteps, pad){
8 * Format timestamp into a time string.
10 function toTimeString(ms){
11 var h = ms < HOUR ? 0 : countSteps(ms, HOUR),
12 m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60),
13 s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60),
16 str += h? h + ':' : '';
17 str += pad(m, 2) + ':';