Manage timing and program pause. More...
#include <NRE_Clock.hpp>
Public Member Functions | |
Clock () | |
Clock (Clock const &c)=default | |
Clock (Clock &&c)=default | |
~Clock ()=default | |
TimeStep const & | getTimestep () const |
float | getDelta () const |
void | update () |
void | updateAndSleep (TimeStep const &time) |
void | sleep (TimeStep const &time) |
void | showFPS () |
void | hideFPS () |
Clock & | operator= (Clock const &c)=default |
Clock & | operator= (Clock &&c)=default |
Utility::String | toString () const |
Static Public Attributes | |
static float | TIMESTEP = 0 |
Manage timing and program pause.
NRE::Time::Clock::Clock | ( | ) |
Default constructor
|
default |
Copy c into this
c | the clock to copy |
|
default |
Move c into this
c | the clock to move |
|
default |
Clock Deconstructor
float NRE::Time::Clock::getDelta | ( | ) | const |
TimeStep const& NRE::Time::Clock::getTimestep | ( | ) | const |
void NRE::Time::Clock::hideFPS | ( | ) |
Disable fps display
Copy assignment of c into this
c | the clock to copy into this |
Move assignment of c into this, leaving c empty
c | the clock to move into this |
void NRE::Time::Clock::showFPS | ( | ) |
Enable fps display
void NRE::Time::Clock::sleep | ( | TimeStep const & | time | ) |
Sleep for a given time
time | the timestep to sleep |
String NRE::Time::Clock::toString | ( | ) | const |
Convert the clock into a string
void NRE::Time::Clock::update | ( | ) |
Update the clock
void NRE::Time::Clock::updateAndSleep | ( | TimeStep const & | time | ) |
Update the clock and sleep if the timestep is lesser than the given limit
time | the minimum timestep |
|
static |
The application's delta