|
CVD 0.8
|
Provides a simple timer class which uses cvd_timer internally. More...
#include <timer.h>
Public Member Functions | |
| SimpleTimer (const std::string &description, const int &cycles_to_time=1, bool output=true, std::ostream &out=std::cout) | |
| ~SimpleTimer () | |
| void | click () |
| void | print () |
| double | get_max () |
| double | get_min () |
| double | get_average () |
Provides a simple timer class which uses cvd_timer internally.
Statistics (average, max and min cycle time) are kept and output for a number of timing cycles. Cycle times are stored in a std::deque<double> and statistics only calculated when the get or print functions are called.
| CVD::SimpleTimer::SimpleTimer | ( | const std::string & | description, |
| const int & | cycles_to_time = 1, |
||
| bool | output = true, |
||
| std::ostream & | out = std::cout |
||
| ) | [inline] |
Create a simple timer object.
| description | A string description of what is being timed (used in output) |
| cycles_to_time | How many cycles to time before the times are averaged and output (default 1). |
| output | Whether or not to output timing information. Default is true. |
| out | std::ostream to send output information to. Default std::cout. |
| void CVD::SimpleTimer::print | ( | ) | [inline] |
1.7.4