#include <ScopedTimer.h>
Stores the start time in the constructor, and accumulates the destructor time - start time into the time passed into the constructor. The enabled constructor flag allows for easy disabling of the timer without removing it from the code.
Definition at line 26 of file ScopedTimer.h.
Public Member Functions | |
ScopedTimer (uint64_t &t, bool enabled=true) | |
constructor. creates object. | |
~ScopedTimer () | |
on destruction, if enabled, adds the current time - start time to time from contructor. |
ScopedTimer::ScopedTimer | ( | uint64_t & | t, | |
bool | enabled = true | |||
) | [inline] |
constructor. creates object.
if enabled, stores the start time in a variable for adding it to t
later.
t | reference to uint64_t to add the lifespan of this object to | |
enabled | if false the timer does nothing |
Definition at line 36 of file ScopedTimer.h.