#include <Timer.h>
Public Member Functions | |
| Timer () | |
| Constructor. | |
| ~Timer () | |
| Destructor. | |
| void | Start () |
| Starts the timer. A delay must have been set. | |
| int | GetDelay () |
| Returns the delay the timer will set when you call Start(). Note that it is NOT the remaining delay if you've already called Start(). | |
| void | SetDelay (int ms) |
| Sets the delay before OnTick() is triggered after Start() is called. | |
Protected Member Functions | |
| virtual void | OnTick ()=0 |
| Function triggered when the timer has been started and its delay expired. | |
Protected Attributes | |
| int | m_Delay |
| Delay before OnTick() is triggered after Start() is called. | |
Friends | |
| class | MasterTimer |
Note that these timers are not suitable for every kind of timed operations; as an example, if you want do display a character that walks all the time, you would better check at each render what's the current time and extrapolate its position, rather than calling a timer with 1ms that will tick all the time.
|
|
Constructor.
|
|
|
Destructor.
|
|
|
Returns the delay the timer will set when you call Start(). Note that it is NOT the remaining delay if you've already called Start().
|
|
|
Function triggered when the timer has been started and its delay expired.
|
|
|
Sets the delay before OnTick() is triggered after Start() is called.
|
|
|
Starts the timer. A delay must have been set.
|
|
|
|
|
|
Delay before OnTick() is triggered after Start() is called.
|
1.4.4