Stop watch class.
More...
#include <utils.h>
Stop watch class.
This class can be used to measure the elapsed time (in seconds) for different strategies or other functions. It is a wrapper around std::chrono.
- Author
- David Eriksson, dme65.nosp@m.@cor.nosp@m.nell..nosp@m.edu
sot::StopWatch::StopWatch |
( |
| ) |
|
|
inline |
Constructor.
Initializes a watch that isn't started
void sot::StopWatch::start |
( |
| ) |
|
|
inline |
Starts the watch.
- Exceptions
-
std::logic_error | If the watch has already been started |
double sot::StopWatch::stop |
( |
| ) |
|
|
inline |
Stops the watch and returns the time elapsed.
- Returns
- Time elapsed (seconds) since the watch was started
- Exceptions
-
std::logic_error | If the watch hasn't already been started |
The documentation for this class was generated from the following file: