25 #include "../types.hpp"
62 void start() { _start = clock(); }
71 void stop() { _stop = clock(); }
84 return ((
double)(_stop-_start))/CLOCKS_PER_SEC;
void start()
set start value
Definition: clock_timer.hpp:62
clock_t _start
start time
Definition: clock_timer.hpp:44
string unit() const
get time unit
Definition: clock_timer.hpp:89
Definition: add_op.hpp:29
float64 duration() const
get duration
Definition: clock_timer.hpp:82
static const string name
name of the timer
Definition: clock_timer.hpp:50
double float64
64Bit IEEE floating point type
Definition: types/types.hpp:56
void stop()
set stop value
Definition: clock_timer.hpp:71
clock_t _stop
stop time
Definition: clock_timer.hpp:45
clock() timer
Definition: clock_timer.hpp:41
std::string string
String type.
Definition: types/types.hpp:69
clock_timer()
default constructor
Definition: clock_timer.hpp:53