|
evan 2026.1.4
Evan
|
RAII timer feeding one PhaseStats. More...
#include <headers/evan/FrameStats.hpp>
Public Member Functions | |
| ScopedTimer (PhaseStats *phase) noexcept | |
Starts measuring into phase. | |
| ~ScopedTimer () noexcept | |
| Adds the elapsed time to the destination phase. | |
| ScopedTimer (const ScopedTimer &)=delete | |
| ScopedTimer & | operator= (const ScopedTimer &)=delete |
| ScopedTimer (ScopedTimer &&)=delete | |
| ScopedTimer & | operator= (ScopedTimer &&)=delete |
RAII timer feeding one PhaseStats.
Constructed through FrameStats::timer(), which hands out a disabled timer (null sink) when statistics are off, so the disabled cost at the call site is a single predictable branch and no clock read.
Definition at line 85 of file FrameStats.hpp.
|
inlineexplicitnoexcept |
Starts measuring into phase.
| phase | Destination phase, or nullptr to disable the timer. |
Definition at line 93 of file FrameStats.hpp.
|
inlinenoexcept |
Adds the elapsed time to the destination phase.
Definition at line 102 of file FrameStats.hpp.
