How to parse a given amount of milliseconds (e.g. 125230.41294642858
) into a time format like: minutes:seconds
?
Advertisement
Answer
var ms = 125230.41294642858, min = 0|(ms/1000/60), sec = 0|(ms/1000) % 60; alert(min + ':' + sec);
How to parse a given amount of milliseconds (e.g. 125230.41294642858
) into a time format like: minutes:seconds
?
var ms = 125230.41294642858, min = 0|(ms/1000/60), sec = 0|(ms/1000) % 60; alert(min + ':' + sec);