Timer
Calls registered functions at a regular interval. By defeault Timers do not repeat.
Properties
Name | Type | Access | Description |
---|---|---|---|
hooks | Table of TimerHook | R | Active hooks |
id | String | R | Identifier of the string |
interval | Number | RW | Interval at which timer will fire |
repeats | Boolean | RW | If false, the Timer will only fire once |
state | Timer.State | R | Current action of the Timer. |
Functions and Enumerations
- Constructors
Constructors for the Timer class.
- Timer( id, interval, state )
Create a new Timer
- Timer( id, interval, state )
- Static Functions
Functions that are called without an instance of the Timer class.
- find( id )
Find a Timer by ID
- getAll( )
Get all active Timers
- stopAll( )
Stop all active Timers
- find( id )
- Instance Functions
Functions that are used with a Timer instance.
- hook( id, table, function, argument )
Add a hook functions
- start( )
Start the Timer
- stop( )
Stop the Timer
- unhook( id )
Remove a hook function from the Timer.
- unhook( hook )
Remove a hook function
- hook( id, table, function, argument )
- Enumerations
Enumerations that are part of the Timer class.
- State
What the Timer is doing
- State