|
Kemena3D
|
Measures elapsed time between consecutive frames. More...
#include <ktimer.h>
Public Member Functions | |
| kTimer () | |
| Constructs the timer and initialises its internal reference timestamp. | |
| void | tick () |
| Records the current time and computes the delta since the last tick. | |
| float | getDeltaTime () |
| Returns the elapsed time (in seconds) between the last two tick() calls. | |
Measures elapsed time between consecutive frames.
Call tick() once per frame (before reading getDeltaTime()) to update the stored delta-time value.
| kemena::kTimer::kTimer | ( | ) |
Constructs the timer and initialises its internal reference timestamp.
| float kemena::kTimer::getDeltaTime | ( | ) |
Returns the elapsed time (in seconds) between the last two tick() calls.
| void kemena::kTimer::tick | ( | ) |
Records the current time and computes the delta since the last tick.
Must be called once per frame before getDeltaTime().