Timer abstraction with microsecond resolution. More...
#include <shark/Core/Timer.h>
Public Member Functions | |
Timer (bool measureWallclockTime=true) | |
void | start () |
Stores the current time in m_startTime. More... | |
double | stop () |
Returns the difference between current time and the start time. More... | |
double | lastLap () |
Returns the last value of stop(). More... | |
Static Public Member Functions | |
static double | now (bool measureWallclockTime=true) |
Returns the current time in a microsecond resolution. Att: may in rare cases give decreasing values. More... | |
Timer abstraction with microsecond resolution.
|
inline |
|
inline |
|
inlinestatic |
Returns the current time in a microsecond resolution. Att: may in rare cases give decreasing values.
Definition at line 66 of file Timer.h.
Referenced by shark::QpSolver< Problem, SelectionStrategy >::solve(), shark::BiasSolver< Matrix >::solve(), shark::BiasSolverSimplex< Matrix >::solve(), start(), and stop().
|
inline |
Stores the current time in m_startTime.
Definition at line 97 of file Timer.h.
References now().
Referenced by shark::QpMcLinear< InputT >::solve(), and Timer().
|
inline |
Returns the difference between current time and the start time.
The time is meeasured since the last time start() was called. Thus several consecutive calls to stop() will return ascending numbers. start() is called automatically at construction time.
Definition at line 105 of file Timer.h.
References now().