#include <PerfTimers.hpp>
|
| double * | acc = nullptr |
| |
| double | outer = 0.0 |
| | enclosing timer's tally, restored on close
|
| |
| std::chrono::steady_clock::time_point | t0 |
| |
◆ GatedTimer() [1/2]
| openswmm::perf::GatedTimer::GatedTimer |
( |
double & | a | ) |
|
|
inlineexplicitnoexcept |
Start a profiling-gated self-time interval on the current thread.
When disabled, stores no accumulator and reads no clock. When enabled, saves the thread-local enclosing tally and starts a new one. Timers must nest lexically and be destroyed on the same thread.
- Parameters
-
| [in,out] | a | Borrowed seconds accumulator; must outlive this timer and be externally serialized if shared. |
◆ ~GatedTimer()
| openswmm::perf::GatedTimer::~GatedTimer |
( |
| ) |
|
|
inlinenoexcept |
Add elapsed wall time excluding nested GatedTimer intervals.
No-op when disabled at construction. Restores parent thread-local tally including this full interval. Accumulator write is not atomic; overlapping timers on distinct threads need separate accumulators or synchronization.
◆ GatedTimer() [2/2]
| openswmm::perf::GatedTimer::GatedTimer |
( |
const GatedTimer & | | ) |
|
|
delete |
Prevent copying an active GatedTimer scope.
A copied scope would duplicate ownership of timing/counter cleanup and is forbidden at compile time.
◆ operator=()
Prevent replacing an active GatedTimer scope by copy assignment.
Scope state must be completed by its original object on the thread that created it.
◆ acc
| double* openswmm::perf::GatedTimer::acc = nullptr |
◆ outer
| double openswmm::perf::GatedTimer::outer = 0.0 |
enclosing timer's tally, restored on close
◆ t0
| std::chrono::steady_clock::time_point openswmm::perf::GatedTimer::t0 |
The documentation for this struct was generated from the following file:
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/core/PerfTimers.hpp