◆ TimerProc
typedef void(* Common::TimerManager::TimerProc) (void *refCon) |
Type definition of a timer instance.
◆ installTimerProc()
virtual bool Common::TimerManager::installTimerProc |
( |
TimerProc |
proc, |
|
|
int32 |
interval, |
|
|
void * |
refCon, |
|
|
const Common::String & |
id |
|
) |
| |
|
pure virtual |
Install a new timer callback.
After it has been created, the timer is called every interval
microseconds. The timer can be invoked from a separate thread. Hence any timer code should be written following the same safety guidelines as any other threaded code.
- Note
- Although the interval is specified in microseconds, the actual timer resolution may be lower. In particular, with the SDL backend the timer resolution is 10 ms.
- Parameters
-
proc | Callback. |
interval | Interval in which the timer shall be invoked (in microseconds). |
refCon | Arbitrary void pointer passed to the timer callback. |
id | Unique string ID of the installed timer. Used by the event recorder. |
- Returns
- True if the timer was installed successfully, false otherwise.
Implemented in DefaultTimerManager.
◆ removeTimerProc()
virtual void Common::TimerManager::removeTimerProc |
( |
TimerProc |
proc | ) |
|
|
pure virtual |
Remove the given timer callback.
It will not be invoked anymore, and no instance of this callback will be running anymore.
Implemented in DefaultTimerManager.
The documentation for this class was generated from the following file: