A class for time measurements.
More...
#include <clock.h>
Public Member Functions |
| Clock () |
| Construct a new clock.
|
| ~Clock () |
| Destroy the clock.
|
Clock & | operator= (const Clock &ref) |
| Assignment operator.
|
void | reset () |
| Reset the base time of the clock to the current time.
|
void | set (const int64_t time) |
| Set the current time of the clock.
|
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.
|
Detailed Description
A class for time measurements.
Definition at line 30 of file clock.h.
Constructor & Destructor Documentation
lunchbox::Clock::Clock |
( |
| ) |
|
Construct a new clock.
- Version
- 1.0
lunchbox::Clock::~Clock |
( |
| ) |
|
Destroy the clock.
- Version
- 1.0
Member Function Documentation
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.
- Returns
- the millisecond part of the time elapsed.
- Deprecated:
int64_t lunchbox::Clock::getTime64 |
( |
| ) |
const |
double lunchbox::Clock::getTimed |
( |
| ) |
const |
- Returns
- the elapsed time in milliseconds since the last clock reset.
- Version
- 1.0
float lunchbox::Clock::getTimef |
( |
| ) |
const |
- Returns
- the elapsed time in milliseconds since the last clock reset.
- Version
- 1.0
Clock& lunchbox::Clock::operator= |
( |
const Clock & |
ref | ) |
|
Assignment operator.
- Version
- 1.7.2
void lunchbox::Clock::reset |
( |
| ) |
|
Reset the base time of the clock to the current time.
- Version
- 1.0
float lunchbox::Clock::resetTimef |
( |
| ) |
|
- Returns
- the elapsed time in milliseconds since the last clock reset and atomically reset the clock.
- Version
- 1.0
void lunchbox::Clock::set |
( |
const int64_t |
time | ) |
|
Set the current time of the clock.
- Version
- 1.0
The documentation for this class was generated from the following file: