#include <timer.h>
This predominantly a wrapper for the system call gettimeofday(), but can also provides a convenient way of converting from other time units. In all cases, the time is given relative to the time the class was created, or the last time reset() was called.
Definition at line 41 of file timer.h.
Public Member Functions | |
cvd_timer () | |
double | get_time () |
double | conv_ntime (signed long long time) |
double | conv_ntime (const struct timeval &tv) |
double | conv_ntime (const double time) const |
double | reset () |
CVD::cvd_timer::cvd_timer | ( | ) |
Create a timer, and set the start time to be now.
double CVD::cvd_timer::get_time | ( | ) |
How many seconds have elapsed since the start time?
Referenced by CVD::V4L1Buffer< T >::get_frame().
double CVD::cvd_timer::conv_ntime | ( | signed long long | time | ) |
Convert the current time from units of nanoseconds into a double, correcting for the start time.
time | The current time in nanoseconds |
double CVD::cvd_timer::conv_ntime | ( | const struct timeval & | tv | ) |
Convert the current time from a timeval into a double, correcting for the start time.
tv | The current time as a timeval |
double CVD::cvd_timer::conv_ntime | ( | const double | time | ) | const [inline] |
double CVD::cvd_timer::reset | ( | ) |
Sets the start time to the current time.