Here's the sub:
;-------------------------------------------------------------------------------
; %1 = input - Time to convert
; #RESULT - Time converted to #:##:## format
sub ConvertTimeHourMinSec
namespace push
namespace local ctime
set !hourpart %1 / 3600
set !secpart ( %1 % 3600 ) % 60
set !minpart ( ( %1 % 3600 ) / 60 )
if !hourpart >= 10
set #RESULT !hourpart , :
else
set #RESULT 0 , !hourpart , :
if !minpart < 10
set #RESULT #RESULT , 0
set #RESULT #RESULT , !minpart , :
if !secpart < 10
set #RESULT #RESULT , 0
set #RESULT #RESULT , !secpart
namespace pop
return #RESULT
Just send it your #SCNT - %starttime.
And here it is for OEUO:
---------------------------------------------------------------
function ConvertTimeHourMinSec(t)
local hourpart = math.floor(t / 3600)
local secpart = math.floor(( t % 3600 ) % 60)
local minpart = math.floor(( t % 3600 ) / 60)
local rval = ""
if hourpart >= 10 then
rval = hourpart..":"
else
rval = "0"..hourpart..":"
end
if minpart < 10 then
rval = rval.."0"
end
rval = rval..minpart..":"
if secpart < 10 then
rval = rval.."0"
end
return rval..secpart
end