I did this , not tested yet
Code:
mult=1
;remaining time in seconds = (left * LAPSE )/100
REMTIMEHOU = left ** lapse
while REMTIMEHOU
mult=mult*10
if lapse > left then
REMTIMESEC = lapse /mult
REMTIMEMIN = left
else
REMTIMESEC = left/mult
REMTIMEMIN = lapse
endif
REMTIMEHOU = REMTIMESEC ** REMTIMEMIN
wend
select case mult
case 1
REMTIMEHOU = left * lapse
REMTIMESEC = div32 100
REMTIMEHOU=REMTIMESEC//3600
REMTIMESEC=REMTIMESEC/3600
case 10
REMTIMEHOU = left * lapse
REMTIMESEC = div32 1000
REMTIMEHOU=REMTIMESEC//360
REMTIMESEC=REMTIMESEC/360
case 100
REMTIMEHOU = left * lapse
REMTIMESEC = div32 10000
REMTIMEHOU=REMTIMESEC//36
REMTIMESEC=REMTIMESEC/36
case else
; wtf error
end select
REMTIMEMIN=REMTIMESEC//60
REMTIMESEC=REMTIMESEC/60
ARRAYWRITE buff,["REMAINING ",DEC2 REMTIMEHOU,":",DEC2 REMTIMEMIN,":",DEC2 REMTIMESEC,0]
GLCDSTR 25,80 ,buff
Bookmarks