1 #ifndef CARMA_UTIL_STOPWATCH_H
2 #define CARMA_UTIL_STOPWATCH_H
45 explicit StopWatch( const ::std::string & name );
51 const ::std::string & name );
87 const ::std::string name_;
91 double cumulativeElapsedTime_;
93 struct timespec scratchTimeSpec_;
99 #endif //CARMA_UTIL_STOPWATCH_H
bool isRunning() const
is the watch running?
void stop()
stop the watch
void start()
start the watch
ClockType
enumeration for clock type
~StopWatch()
destructor, does nothing
Class for determining the elapsed wall-clock or CPU time between two events.
double getElapsedTime() const
get the time interval in seconds between the last start() and stop()
double getCumulativeElapsedTime(bool reset=false)
get the the sum of the time intervals between each start and stop pair