![]() |
Raven Engine v0.1
|
A scoped timer class for automatic timing. More...
#include <Timer.h>
Public Member Functions | |
| ScopedTimer (std::string name, std::optional< float > threshold=std::nullopt) | |
| Constructs a ScopedTimer with a name and an optional threshold. | |
| ~ScopedTimer () | |
| Destructor for the ScopedTimer. | |
Static Public Member Functions | |
| static const std::vector< TimerData > & | GetTimers () |
| Returns the list of timers. | |
A scoped timer class for automatic timing.
This class automatically measures the elapsed time when it goes out of scope. It can also log the elapsed time if it exceeds a specified threshold.
|
inlineexplicit |
Constructs a ScopedTimer with a name and an optional threshold.
| name | The name of the timer. |
| threshold | The optional threshold for performance measurement. |
|
inline |
Destructor for the ScopedTimer.
This method logs the elapsed time and checks against the threshold.
|
inlinestaticnodiscard |