33 #ifndef TIME_MEASURE_H 34 #define TIME_MEASURE_H 97 gettimeofday(&actTime,
nullptr);
98 mStartTime = actTime.tv_sec + actTime.tv_usec * 1.0e-6;
109 gettimeofday(&actTime,
nullptr);
110 mStopTime = actTime.tv_sec + actTime.tv_usec * 1.0e-6;
TimeMeasure & operator=(const TimeMeasure &src)
operator=
double getElapsedTime() const
Get elapsed time.
Class measuring elapsed time.
void SetElapsedTimeOverPreviousLegs(const double elapsedTime)
Set elapsed time in previous legs of the simulation.
double getElapsedTimeOverPreviousLegs() const
Get time spent in previous legs.
double mStartTime
Start timestamp of the interval.
double getElapsedTimeOverAllLegs() const
Get cumulated elapsed time over all simulation legs.
TimeMeasure()
Default constructor.
TimeMeasure(const TimeMeasure &src)
Copy constructor.
void start()
Take start timestamp.
void stop()
Take stop timestamp.
double mElapsedTimeOverPreviousLegs
Elapsed time in previous simulation legs.
double mStopTime
Stop timestamp of the interval.
virtual ~TimeMeasure()
Destructor.