equal
deleted
inserted
replaced
36 return "0" + num.toString(); |
36 return "0" + num.toString(); |
37 } else { |
37 } else { |
38 return num.toString(); |
38 return num.toString(); |
39 } |
39 } |
40 }; |
40 }; |
|
41 |
|
42 /* convert a number of milliseconds to a tuple of the form |
|
43 [hours, minutes, seconds] |
|
44 */ |
|
45 IriSP.msToTime = function(ms) { |
|
46 return IriSP.secondsToTime(ms / 1000); |
|
47 } |
41 /* convert a number of seconds to a tuple of the form |
48 /* convert a number of seconds to a tuple of the form |
42 [hours, minutes, seconds] |
49 [hours, minutes, seconds] |
43 */ |
50 */ |
44 IriSP.secondsToTime = function(secs) { |
51 IriSP.secondsToTime = function(secs) { |
45 var hours = Math.abs(parseInt( secs / 3600 ) % 24); |
52 var hours = Math.abs(parseInt( secs / 3600 ) % 24); |