Simpatico
v1.10
|
Wall clock timer.
A Timer keeps track of the time elapsed during one or more interval. Each interval begins when start() is called and ends when stop() is called. If start() and stop() are invoked repeatedly, the timer accumulates the time elapses in multiple intervals. The accumulated time is returned by the time() method, and can be reset to zero by the clear() method.
#include <Timer.h>
Public Member Functions | |
Timer () | |
Constructor. More... | |
void | start () |
Start the clock. More... | |
void | stop () |
Stop the clock, increment time. More... | |
void | clear () |
Set accumulated time to zero. More... | |
double | time () |
Get the accumulated time, in seconds. More... | |
bool | isRunning () |
Is the timer running? More... | |
|
inline |
Start the clock.
Definition at line 78 of file Timer.h.
References UTIL_THROW.
Referenced by McMd::MdSimulation::analyzeConfigs(), McMd::McSimulation::analyzeConfigs(), McMd::MdSimulation::analyzeTrajectory(), McMd::McSimulation::analyzeTrajectory(), McMd::MdSimulation::simulate(), and McMd::McSimulation::simulate().
|
inline |
Stop the clock, increment time.
Definition at line 89 of file Timer.h.
References UTIL_THROW.
Referenced by McMd::MdSimulation::analyzeConfigs(), McMd::McSimulation::analyzeConfigs(), McMd::MdSimulation::analyzeTrajectory(), McMd::McSimulation::analyzeTrajectory(), McMd::MdSimulation::simulate(), and McMd::McSimulation::simulate().
|
inline |
|
inline |
Get the accumulated time, in seconds.
Definition at line 110 of file Timer.h.
Referenced by McMd::MdSimulation::analyzeConfigs(), McMd::McSimulation::analyzeConfigs(), McMd::MdSimulation::analyzeTrajectory(), McMd::McSimulation::analyzeTrajectory(), McMd::MdSimulation::simulate(), and McMd::McSimulation::simulate().
|
inline |