19 #include <sys/timeb.h> 40 :intervalRunning(
false)
51 this->offset = startTime;
54 t0 = (double)(t.time + t.millitm/1000.0);
67 return(t2-t0 + offset);
76 intervalRunning =
true;
78 t1 = (double)(t.time + t.millitm/1000.0);
89 if(intervalRunning ==
false)
94 t2 = (double)(t.time + t.millitm/1000.0);
104 bool intervalRunning;
110 t2 = (double)(t.time + t.millitm/1000.0);
double initialize(double startTime=0.0)
Set the start time.
Definition: timer.hpp:49
double intervalDelay()
Get the time elapsed since the last call at resetInterval.
Definition: timer.hpp:87
double elapsedTime()
Get the time elapsed since the initialization.
Definition: timer.hpp:64
A timer class.
Definition: timer.hpp:35
void resetInterval()
Start a new interval.
Definition: timer.hpp:74