#include <PropaneTimers.h>
Inheritance diagram for PropaneTimer:

Public Member Functions | |
| float | getTime () |
| Return the current time used. | |
| virtual bool | update (float delta) |
| Update the timer; delta is in seconds. Returns TRUE if this update tripped the timer. | |
| void | reset () |
| Reset the timer and start over. | |
| void | setLimit (float lim) |
| Set the limit where the timer will trip. | |
| float | percentComplete () |
| Check the percent completed of this timer. | |
| void | setIncrements (bool incr) |
| Set whether or not the timer increments or decrements. | |
| PropaneTimer (float limit, bool increment) | |
| Construct with a limit and the option to increment. | |
| PropaneTimer () | |
| Construct with nothing. | |
| virtual | ~PropaneTimer () |
| Destruct. | |
Protected Attributes | |
| float | timer |
| The current time. | |
| float | limit |
| The limit (when decrementing, resetting will set this to it, otherwise it will set to 0 and count up to this limit). | |
| bool | increments |
| Toggle if it's incrementing or decrementing. | |
|
||||||||||||
|
Construct with a limit and the option to increment. Variable constructor.
|
|
|
Construct with nothing. Default constructor, sets 100ms decrementing timer. |
|
|
Destruct. Basic destructor. Does nothing. |
|
|
Return the current time used. Gets the current time elapsed since the last timer fire, in seconds.
|
|
|
Check the percent completed of this timer. Gets the time elapsed since last timer fire, in percentages.
|
|
|
Reset the timer and start over. Resets the time elapsed to 0 |
|
|
Set the limit where the timer will trip. Allows you to set the time span between each timer fire.
|
|
|
Update the timer; delta is in seconds. Returns TRUE if this update tripped the timer. Updates the time span with a given number of seconds. After firing, you must manually reset this timer, or it will continue to return true on successive uses of this method.
Reimplemented in PropaneAutoResetTimer. |
1.4.6