LightsprintSDK 2021.08.08
|
#include <RRDebug.h>
Public Member Functions | |
RRTime (bool setNow=true) | |
void | setNow () |
void | addSeconds (float seconds) |
float | secondsPassed () const |
float | secondsSince (const RRTime &a) const |
float | secondsSinceLastQuery () |
Accurate timer.
|
explicit |
By default, constructor updates time to current time. You can pass false to keep time uninitialized, but then don't call any other time function before setNow(), results would be random.
void rr::RRTime::setNow | ( | ) |
Updates this time, "this = now".
void rr::RRTime::addSeconds | ( | float | seconds | ) |
Modifies this time, "this += seconds".
float rr::RRTime::secondsPassed | ( | ) | const |
Returns number of seconds passed, "now - this".
float rr::RRTime::secondsSince | ( | const RRTime & | a | ) | const |
Returns number of seconds since a, "this - a".
float rr::RRTime::secondsSinceLastQuery | ( | ) |
Returns number of seconds passed, "now - this", and updates this time, "this = now".