netxsimdg
|
A class providing a timer aware of the calling context. More...
#include <ScopedTimer.hpp>
Public Member Functions | |
ScopedTimer (const std::string &name) | |
Creates a scoped timer with a name. | |
void | substitute (const std::string &newName) |
Static Public Member Functions | |
static void | setTimerAddress (Timer *timer) |
static Timer & | timer () |
Returns a reference to the underlying Timer. | |
A class providing a timer aware of the calling context.
Definition at line 20 of file ScopedTimer.hpp.
Nextsim::ScopedTimer::ScopedTimer | ( | ) |
Definition at line 13 of file ScopedTimer.cpp.
Nextsim::ScopedTimer::ScopedTimer | ( | const std::string & | name | ) |
Creates a scoped timer with a name.
Definition at line 18 of file ScopedTimer.cpp.
Nextsim::ScopedTimer::~ScopedTimer | ( | ) |
Definition at line 20 of file ScopedTimer.cpp.
|
static |
Sets the address of the timer which provides the timing functions
timer | A pointer to an instance of the Timer class. |
Definition at line 28 of file ScopedTimer.cpp.
void Nextsim::ScopedTimer::substitute | ( | const std::string & | newName | ) |
Substitutes the currently running timer with a new one with a different name.
newName | the name of the new timer |
Definition at line 22 of file ScopedTimer.cpp.
|
static |
Returns a reference to the underlying Timer.
Definition at line 30 of file ScopedTimer.cpp.