Last Updated: February 25, 2016
·
516
· y_kalkan

HH: MM Format Time Writing

private function formatTime(t:int):String
{
var s:int = Math.round(t);
var m:int = 0;
if (s > 0)
{
while (s > 59) {
m++;
s -= 60;
}
return String((m < 10 ? "0" : "") + m + ":" + (s < 10 ? "0" : "") + s);
}
else
{
return "00:00";
}
}