HH: MM Format Time Writing

função privada 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”;
}
}