Forum Discussion
EnTerr
10 years agoRoku Guru
Eh, you can always fix() it. And let me use an obscure function for no raisin:
The main question however remains...
PS. updated to use int division as reminded by RokuKC
' Format the time left: "h:mm:ss"'
function formatTimeLeft(secs as Integer):
hrs = seconds\3600 ''or fix(seconds/3600)
mins = seconds\60 - 60*hrs ''or fix(seconds/60) - 60*hrs
return substitute("^0:^1:^2", hrs.toStr(), right("0"+mins.toStr(), 2), right("0"+(secs mod 60).toStr(), 2)
end function
The main question however remains...
PS. updated to use int division as reminded by RokuKC