I've rarely used timers before... so I'm a little stumped with this... The program runs uuber quick. The way I understand it, the following code should run for 5 seconds before dropping out of the loop. However it doesn't. It's QUICK. What am I doing wrong?
fpstimer = CreateTimer(60)
endsplash = CreateTimer(100)
While WaitEvent() <> $803
evnt = EventID()
Select evnt
Case $201
End
Case $4001
If EventSource() = fpstimer
Cls
DrawImage splashimg,0,0
FlipCanvas SPLASHCANVAS
EndIf
If EventSource() = endsplash
If splashtime >= 50
FreeTimer fpstimer
FreeTimer endsplash
FreeGadget SPLASHWIN
Return 0
Else
splashtime = EventData()
EndIf
EndIf
End Select
Wend
It's actually a code snippet from a function (splash screen)... hence the return 0.
|