Simple RAII class for measuring the time spent in a scope. More...
#include <juce_PerformanceCounter.h>
Public Member Functions | |
ScopedTimeMeasurement (double &resultInSeconds) noexcept | |
~ScopedTimeMeasurement () | |
Private Attributes | |
double & | result |
int64 | startTimeTicks = Time::getHighResolutionTicks() |
Simple RAII class for measuring the time spent in a scope.
Example:
{ double timeSec;
{ ScopedTimeMeasurement m (timeSec); doSomething(); }
Logger::writeToLog ("doSomething() took " + String (timeSec) + "seconds"); }
resultInSeconds | The result of the measurement will be stored in this variable. |
@tags{Core}
|
inlinenoexcept |
References juce::gl::result.
|
inline |
|
private |
|
private |