GameKit
0.0.1a
C++ gamedev tools
|
Very basic timer. More...
#include <Timer.hpp>
Public Member Functions | |
Timer (bool useRealTime=false) | |
Constructor. More... | |
void | stop () |
Stop the timer. More... | |
void | start () |
Start the timer. More... | |
void | reset () |
Reset the timer. More... | |
u32 | time () const |
Get time. More... | |
void | setTime (u32 time) |
Set time. More... | |
bool | isStarted () const |
Check if the timer is started. More... | |
Private Attributes | |
bool | m_useRealTime = false |
The timer will use system time instead of simulated time if set to true. More... | |
bool | m_isStarted = false |
Is true if the timer is running. More... | |
u32 | m_t = 0 |
u32 | m_tick = 0 |
Very basic timer.
This class is a very basic timer to help making animations, timed movements, and more.
gk::Timer::Timer | ( | bool | useRealTime = false | ) |
|
inline |
void gk::Timer::setTime | ( | u32 | time | ) |
u32 gk::Timer::time | ( | ) | const |
|
private |
|
private |