97 SimpleTimer(
const std::string &description,
const int &cycles_to_time=1,
bool output=
true, std::ostream &out=
std::cout) :
output_info(output),
max(0),
min(0),
average(0),
text(description),
period(cycles_to_time),
increment(0),
timings(0),
cumulative_time(0),
time_at_start_of_timing(0),
timing_started(false),
sout(out)
142 sout<<
text<<
" section : error. No timed cycles. Use click() to start and stop timing."<<std::endl;
double conv_ntime(signed long long time)
double get_time()
How many seconds have elapsed since the start time?
double get_min()
Calculate the min cycle time as double.
double reset()
Sets the start time to the current time.
double get_max()
Calculate the max cycle time as double.
SimpleTimer(const std::string &description, const int &cycles_to_time=1, bool output=true, std::ostream &out=std::cout)
~SimpleTimer()
Destructor. Deletes the internal cvd_timer.
double get_average()
Calculate the average cycle time as double.
double time_at_start_of_timing
void click()
Begin or end a timing cycle. Automatically calls print() when cycles_to_time cycles are reached...
cvd_timer * internal_cvd_timer
std::deque< double > time_buffer
cvd_timer()
Create a timer, and set the start time to be now.
double conv_ntime(const double time) const
unsigned long long startTime