Lunchbox
1.13.0
Multi-threaded C++ toolbox library for all application developers creating high-performance multi-threaded programs.
|
A class for time measurements. More...
#include <clock.h>
Public Member Functions | |
Clock () | |
Construct a new clock. More... | |
Clock (const Clock &from) | |
Copy-construct a new clock with the same start time . More... | |
~Clock () | |
Destroy the clock. More... | |
Clock & | operator= (const Clock &ref) |
Assignment operator. More... | |
void | reset () |
Reset the base time of the clock to the current time. More... | |
void | set (const int64_t time) |
Set the current time of the clock. More... | |
float | getTimef () const |
float | resetTimef () |
int64_t | getTime64 () const |
double | getTimed () const |
float | getMilliSecondsf () const |
Returns the millisecond part of the time elapsed since the last reset. More... | |
lunchbox::Clock::Clock | ( | ) |
Construct a new clock.
lunchbox::Clock::Clock | ( | const Clock & | from | ) |
Copy-construct a new clock with the same start time .
lunchbox::Clock::~Clock | ( | ) |
Destroy the clock.
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.
int64_t lunchbox::Clock::getTime64 | ( | ) | const |
Referenced by lunchbox::Referenced::ref().
double lunchbox::Clock::getTimed | ( | ) | const |
float lunchbox::Clock::getTimef | ( | ) | const |
void lunchbox::Clock::reset | ( | ) |
Reset the base time of the clock to the current time.
float lunchbox::Clock::resetTimef | ( | ) |
void lunchbox::Clock::set | ( | const int64_t | time | ) |
Set the current time of the clock.