Lunchbox
1.11.0
|
A class for time measurements. More...
#include <clock.h>
Public Member Functions | |
LUNCHBOX_API | Clock () |
Construct a new clock. More... | |
LUNCHBOX_API | Clock (const Clock &from) |
Copy-construct a new clock with the same start time . More... | |
LUNCHBOX_API | ~Clock () |
Destroy the clock. More... | |
LUNCHBOX_API Clock & | operator= (const Clock &ref) |
Assignment operator. More... | |
LUNCHBOX_API void | reset () |
Reset the base time of the clock to the current time. More... | |
LUNCHBOX_API void | set (const int64_t time) |
Set the current time of the clock. More... | |
LUNCHBOX_API float | getTimef () const |
LUNCHBOX_API float | resetTimef () |
LUNCHBOX_API int64_t | getTime64 () const |
LUNCHBOX_API double | getTimed () const |
LUNCHBOX_API float | getMilliSecondsf () const |
Returns the millisecond part of the time elapsed since the last reset. More... | |
LUNCHBOX_API lunchbox::Clock::Clock | ( | ) |
Construct a new clock.
LUNCHBOX_API lunchbox::Clock::Clock | ( | const Clock & | from | ) |
Copy-construct a new clock with the same start time .
LUNCHBOX_API lunchbox::Clock::~Clock | ( | ) |
Destroy the clock.
LUNCHBOX_API float lunchbox::Clock::getMilliSecondsf | ( | ) | const |
Returns the millisecond part of the time elapsed since the last reset.
Obviously the returned time overflows once per second.
LUNCHBOX_API int64_t lunchbox::Clock::getTime64 | ( | ) | const |
Referenced by lunchbox::Referenced::ref().
LUNCHBOX_API double lunchbox::Clock::getTimed | ( | ) | const |
LUNCHBOX_API float lunchbox::Clock::getTimef | ( | ) | const |
Assignment operator.
LUNCHBOX_API void lunchbox::Clock::reset | ( | ) |
Reset the base time of the clock to the current time.
LUNCHBOX_API float lunchbox::Clock::resetTimef | ( | ) |
LUNCHBOX_API void lunchbox::Clock::set | ( | const int64_t | time | ) |
Set the current time of the clock.