BRL.Timer: Functions Modinfo Source  

Timers

Functions

Function CreateTimer:TTimer( hertz#,event:TEvent=Null )
ReturnsA new timer object.
DescriptionCreate a timer.
InformationCreateTimer 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 )
DescriptionStop a timer.
InformationOnce stopped, a timer can no longer be used.

Function TimerTicks( timer:TTimer )
ReturnsThe number of times timer has ticked over.
DescriptionGet timer tick counter.

Function WaitTimer( timer:TTimer )
ReturnsThe number of ticks since the last call to WaitTimer.
DescriptionWait until a timer ticks.
Example
timer=CreateTimer( 10 )

Repeat
	Print "Ticks="+WaitTimer( timer )
Forever

Module Information

Version1.01
AuthorSimon Armstrong
LicenseBlitz Shared Source Code
CopyrightBlitz Research Ltd
ModserverBRL
History1.01 release
Historyremoved brl.standardio dependancy