#include <Stopwatch.h>
Classes | |
| class | Handler |
| Auxiliary class for handling exception-safe start/pause and start/stop. More... | |
| class | Watch |
| Class to store a single stopwatch. More... | |
Public Member Functions | |
| Stopwatch ()=default | |
| Stopwatch (Log &log) | |
| ~Stopwatch () | |
| Stopwatch & | pause (const std::string &name=StopwatchEmptyString()) |
| Pause timer named "name". | |
| Stopwatch & | start (const std::string &name=StopwatchEmptyString()) |
| Start timer named "name". | |
| Handler | startPause (const std::string &name=StopwatchEmptyString()) |
| Start with exception safety, then pause. | |
| Handler | startStop (const std::string &name=StopwatchEmptyString()) |
| Start with exception safety, then stop. | |
| Stopwatch & | stop (const std::string &name=StopwatchEmptyString()) |
| Stop timer named "name". | |
Private Member Functions | |
| std::ostream & | log (std::ostream &os) const |
| Log over stream os. | |
Private Attributes | |
| Log * | mylog =nullptr |
| Pointer to a log file. | |
| std::unordered_map< std::string, Watch > | watches |
| List of watches. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Stopwatch &sw) |
| Dump all timers on an ostream. | |
|
explicitdefault |
|
inlineexplicit |
| PLMD::Stopwatch::~Stopwatch | ( | ) |
|
private |
Log over stream os.
|
inline |
Pause timer named "name".
|
inline |
Start timer named "name".
|
inline |
|
inline |
|
inline |
Stop timer named "name".
|
friend |
Dump all timers on an ostream.
Pointer to a log file.
If set, the stopwatch is logged in its destructor.
|
private |
List of watches.
Each watch is labeled with a string.
Hosted by GitHub
|
1.17.0
|