#include <PhTimer.h>
Public Member Functions | |
PhTimer () | |
Constructor. | |
void | startTimer () |
Start timer. | |
void | stopTimer () |
Stop timer. | |
void | pauseTimer () |
Pause timer. | |
void | resumeTimer () |
Resume Timer. | |
int | getTicks () |
Get ticks. | |
bool | isStarted () |
Is started. | |
bool | isPaused () |
Is paused. |
A class that provides a simple interface to a real time clock. This class might not ever be used by the user but it is used internally for FPS calculations. It's not suggested to do events based on a timer because of the fact that everything is done by frames, therefore it is better to do things by frames instead of seconds.
void phoenix::PhTimer::startTimer | ( | ) |
Start timer.
Starts the timer.
void phoenix::PhTimer::stopTimer | ( | ) |
Stop timer.
Stops the timer and sets it to zero.
void phoenix::PhTimer::pauseTimer | ( | ) |
Pause timer.
Pauses the timer in place.
void phoenix::PhTimer::resumeTimer | ( | ) |
Resume Timer.
Resumes the timer from where it stopped.
int phoenix::PhTimer::getTicks | ( | ) |
Get ticks.
Returns how many ticks (ms) the timer has gone through.
bool phoenix::PhTimer::isStarted | ( | ) |
Is started.
bool phoenix::PhTimer::isPaused | ( | ) |
Is paused.