kspaceFirstOrder3D-OMP  1.2
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
TimeMeasure Class Reference

Class measuring elapsed time. More...

#include <TimeMeasure.h>

Public Member Functions

 TimeMeasure ()
 Default constructor.
 
virtual ~TimeMeasure ()
 Destructor.
 
 TimeMeasure (const TimeMeasure &src)
 Copy constructor. More...
 
TimeMeasureoperator= (const TimeMeasure &src)
 operator= More...
 
void start ()
 Take start timestamp.
 
void stop ()
 Take stop timestamp.
 
double getElapsedTime () const
 Get elapsed time. More...
 
double getElapsedTimeOverAllLegs () const
 Get cumulated elapsed time over all simulation legs. More...
 
double getElapsedTimeOverPreviousLegs () const
 Get time spent in previous legs. More...
 
void SetElapsedTimeOverPreviousLegs (const double elapsedTime)
 Set elapsed time in previous legs of the simulation. More...
 

Private Attributes

double mStartTime
 Start timestamp of the interval.
 
double mStopTime
 Stop timestamp of the interval.
 
double mElapsedTimeOverPreviousLegs
 Elapsed time in previous simulation legs.
 

Detailed Description

Class measuring elapsed time, even over multiple simulation legs.

Definition at line 48 of file TimeMeasure.h.

Constructor & Destructor Documentation

◆ TimeMeasure()

TimeMeasure::TimeMeasure ( const TimeMeasure src)
inline

Copy constructor.

Parameters
[in]src- The other class to copy from

Definition at line 67 of file TimeMeasure.h.

Member Function Documentation

◆ getElapsedTime()

double TimeMeasure::getElapsedTime ( ) const
inline

Get elapsed time.

Returns
Elapsed time between start timestamp and stop timestamp.

Definition at line 119 of file TimeMeasure.h.

◆ getElapsedTimeOverAllLegs()

double TimeMeasure::getElapsedTimeOverAllLegs ( ) const
inline

Get cumulated elapsed time over all simulation legs.

Returns
Elapsed time all (including this one) legs.

Definition at line 129 of file TimeMeasure.h.

◆ getElapsedTimeOverPreviousLegs()

double TimeMeasure::getElapsedTimeOverPreviousLegs ( ) const
inline

Get time spent in previous legs.

Returns
Elapsed time over previous legs.

Definition at line 139 of file TimeMeasure.h.

◆ operator=()

TimeMeasure& TimeMeasure::operator= ( const TimeMeasure src)
inline

operator=

Parameters
[in]src- Source.
Returns

Definition at line 79 of file TimeMeasure.h.

◆ SetElapsedTimeOverPreviousLegs()

void TimeMeasure::SetElapsedTimeOverPreviousLegs ( const double  elapsedTime)
inline

Set elapsed time in previous legs of the simulation.

Parameters
[in]elapsedTime- Elapsed time.

Definition at line 149 of file TimeMeasure.h.


The documentation for this class was generated from the following file: