BRL.Timer: | Functions | Modinfo | Source |
Function CreateTimer:TTimer( hertz#,event:TEvent=Null ) | |
Returns | A new timer object. |
Description | Create a timer. |
Information | CreateTimer creates a timer object that 'ticks' hertz times per second. Each time the timer ticks, event will be emitted using EmitEvent. If event is Null, an event with an id equal to EVENT_TIMERTICK and source equal to the timer object will be emitted instead. |
Function StopTimer( timer:TTimer ) | |
Description | Stop a timer. |
Information | Once stopped, a timer can no longer be used. |
Function TimerTicks( timer:TTimer ) | |
Returns | The number of times timer has ticked over. |
Description | Get timer tick counter. |
Function WaitTimer( timer:TTimer ) | |
Returns | The number of ticks since the last call to WaitTimer. |
Description | Wait until a timer ticks. |
Example | timer=CreateTimer( 10 ) Repeat Print "Ticks="+WaitTimer( timer ) Forever |
Version | 1.01 |
---|---|
Author | Simon Armstrong |
License | Blitz Shared Source Code |
Copyright | Blitz Research Ltd |
Modserver | BRL |
History | 1.01 release |
History | removed brl.standardio dependancy |