Class for determining the elapsed wall-clock or CPU time between two events.
More...
#include <carma/util/StopWatch.h>
|
enum | ClockType { WALL_CLOCK = 0,
CPU_TIME = 1
} |
| enumeration for clock type More...
|
|
|
double | cumulativeElapsedTime_ |
|
double | elapsedTime_ |
|
const ::std::string | name_ |
|
bool | running_ |
|
struct timespec | scratchTimeSpec_ |
|
double | startTime_ |
|
const ClockType | type_ |
|
Class for determining the elapsed wall-clock or CPU time between two events.
Precision of a few clock ticks for a single start()/stop() event pair on a lightly loaded machine
Definition at line 22 of file StopWatch.h.
enumeration for clock type
Definition at line 27 of file StopWatch.h.
carma::util::StopWatch::StopWatch |
( |
| ) |
|
|
explicit |
carma::util::StopWatch::StopWatch |
( |
ClockType |
type | ) |
|
|
explicit |
carma::util::StopWatch::StopWatch |
( |
const ::std::string & |
name | ) |
|
|
explicit |
carma::util::StopWatch::StopWatch |
( |
ClockType |
type, |
|
|
const ::std::string & |
name |
|
) |
| |
carma::util::StopWatch::~StopWatch |
( |
| ) |
|
double carma::util::StopWatch::getCumulativeElapsedTime |
( |
bool |
reset = false | ) |
|
get the the sum of the time intervals between each start and stop pair
double carma::util::StopWatch::getElapsedTime |
( |
| ) |
const |
get the time interval in seconds between the last start() and stop()
bool carma::util::StopWatch::isRunning |
( |
| ) |
const |
void carma::util::StopWatch::start |
( |
| ) |
|
start the watch
- Exceptions
-
void carma::util::StopWatch::stop |
( |
| ) |
|
stop the watch
- Exceptions
-
The documentation for this class was generated from the following file: