Class Timer
Defined in File Timer.h
Nested Relationships
Nested Types
Class Documentation
-
class Timer
Provides functionality for millisecond precision timing.
Public Functions
-
void reset()
Reset the timer.
-
void wait_until(double offset)
Wait until the specified offset has occured since the last reset of the timer.
- Parameters
offset – offset in microseconds
-
auto get_elapsed_microseconds() -> double
Get the elapsed time since the last reset in microseconds.
- Returns
double elapsed time in microseconds
-
auto get_elapsed_milliseconds() -> int
Get the elapsed time since the last reset in milliseconds.
- Returns
int elapsed time in milliseconds
-
void print_rates(uint64_t bytes)
Print information about the data transfer performance.
- Parameters
bytes – number of bytes to use when calculating effective data rate
-
void reset()