idol
A C++ Framework for Optimization
|
#include <Timer.h>
Public Types | |
enum | Unit { Seconds , Milliseconds , Microseconds } |
Public Member Functions | |
void | start () |
void | stop () |
double | count (Unit t_unit=Seconds) const |
double | cumulative_count (Unit t_unit=Seconds) const |
double | factor (Unit t_unit) const |
This class is used to measure the time it takes for a certain operation to complete.
double idol::Timer::count | ( | Unit | t_unit = Seconds | ) | const |
Returns the time elapsed since the timer was started.
t_unit | the unit of time to return the elapsed time in. |
double idol::Timer::cumulative_count | ( | Unit | t_unit = Seconds | ) | const |
Returns the cumulative elapsed time
t_unit | the unit of time to return the elapsed time in. |
void idol::Timer::start | ( | ) |
Starts the timer.
void idol::Timer::stop | ( | ) |
Stops the timer.