SPACE::Core::cTimer Class Reference
The timer class whis is handled by SPACE::Core::cTimerManager.
More...
#include <cTimer.hpp>
List of all members.
Detailed Description
The timer class whis is handled by SPACE::Core::cTimerManager.
- See also:
- SPACE::Core::cTimerManager
Constructor & Destructor Documentation
| cTimer::cTimer |
( |
void(*)(ePurpose _Purpose) |
_pFunction |
) |
|
Init Variables.
- Parameters:
-
| _pFunction | The function runs, whenever something happens to the timer. |
Member Function Documentation
| bool cTimer::ChangeReapeat |
( |
int |
_Repeat |
) |
|
Changes the total runtime. The time elapsed don't change.
- Parameters:
-
| _Repeat | How often repeats the timer. -1: infinity | 0: only run once | >0: repeats x-times. |
- Returns:
- true => Everything was allright
-
false => something failed
| bool cTimer::ChangeRuntime |
( |
unsigned int |
_TotalRunTime |
) |
|
Changes the total runtime. The time elapsed don't change.
- Parameters:
-
| _TotalRunTime | The new runtime. If it is less than the elapsed time, the timer stops (END_PURPOSE) or repeats |
- Returns:
- true => Everything was allright
-
false => something failed
| void cTimer::ForceStop |
( |
bool |
_bDestroy = true |
) |
|
Stops the timer by hard.
- Parameters:
-
| _bDestroy | If the timer should be destroyed and memory freed set this true [default], if not, set to false. The timer is deleated after the current frame. |
| unsigned int SPACE::Core::cTimer::GetElapse |
( |
|
) |
[inline] |
- Returns:
- Returns the elapsed.
| int SPACE::Core::cTimer::GetRepeat |
( |
|
) |
[inline] |
- Returns:
- Returns how often the timer repeats.
| unsigned int SPACE::Core::cTimer::GetRuntime |
( |
|
) |
[inline] |
- Returns:
- Returns the total Runtime.
Reset the Start time to the current time and set the Elapsed time to 0
- Returns:
- true => Everything was allright
-
false => something failed
| bool cTimer::Start |
( |
unsigned int |
_Length, |
|
|
bool |
_bDestroy = true, |
|
|
int |
_Repeat = 0 | |
|
) |
| | |
Starts the timer.
- Parameters:
-
| _Length | The time, the timer runs. In miliseconds |
| _bDestroy | If the timer should be destroyed and memory freed set this true [default], if not, set to false. The timer is deleated after it stops. |
| _Repeat | How often repeats the timer. -1: infinity | 0: only run once | >0: repeats x-times. |
- Returns:
- true => Everything was allright
-
false => something failed
The documentation for this class was generated from the following files: