|using||Clock = std::chrono::steady_clock|
|the underlying time measuring mechanism More...|
Public Member Functions
|bool||running () const|
|whether we are currently measuring time (i.e. between resume() and pause()) More...|
|bool||ran () const|
|whether we ever measured time (i.e. resume() has been called) More...|
|Clock::duration||total () const|
|ends the current measurement period if needed; requires prior resume() More...|
|when the current period was initiated More...|
|the sum of all finished periods More...|
|uint64_t||resumes_ = 0|
|the total number of resume() calls More...|
|uint64_t||pauses_ = 0|
|the total number of pause() calls More...|
Quickly accumulates related real-time (a.k.a. "physical time" or "wall clock") periods. Continues to run if the caller is blocked on a system call. Usually suitable for measuring CPU overheads of non-sleeping code sequences.
Definition at line 18 of file Stopwatch.h.
Member Typedef Documentation
|using Stopwatch::Clock = std::chrono::steady_clock|
Definition at line 35 of file Stopwatch.h.
Constructor & Destructor Documentation
Definition at line 16 of file Stopwatch.cc.
Member Function Documentation
Definition at line 43 of file Stopwatch.h.
the sum of all measurement period durations (or zero) includes the current measurement period, if any
Definition at line 22 of file Stopwatch.cc.
References now, running(), runStart_, and subtotal_.
Referenced by Format::Format::assemble(), and main().
Member Data Documentation
Definition at line 63 of file Stopwatch.h.
Definition at line 58 of file Stopwatch.h.
Definition at line 60 of file Stopwatch.h.
The documentation for this class was generated from the following files: