Ewoms::Timer Class Reference

Provides an encapsulation to measure the system time. More...

#include <timer.hh>

Public Member Functions

 Timer ()
 
void start ()
 Start counting the time resources used by the simulation. More...
 
void stop ()
 Stop counting the time resources used by the simulation. More...
 
void halt ()
 Stop the measurement and always return 0 for all timing values. More...
 
double realTimeElapsed () const
 Return the real time [s] elapsed. More...
 
double cpuTimeElapsed () const
 Return the CPU time [s] used by all threads of the local process. More...
 
double globalCpuTimeElapsed () const
 Return the CPU time [s] used by all threads of the all processes of the simulation. More...
 

Detailed Description

Provides an encapsulation to measure the system time.

This means the wall clock time used by the simulation, the CPU time used by all threads of a single process and the CPU time used by the overall simulation. (i.e., the time used by all threads of all involved processes.)

Constructor & Destructor Documentation

Ewoms::Timer::Timer ( )
inline

References halt().

Member Function Documentation

double Ewoms::Timer::cpuTimeElapsed ( ) const
inline

Return the CPU time [s] used by all threads of the local process.

If stop() was not yet called, this returns the time elapsed since the last call to start().

Referenced by globalCpuTimeElapsed().

double Ewoms::Timer::globalCpuTimeElapsed ( ) const
inline

Return the CPU time [s] used by all threads of the all processes of the simulation.

If stop() was not yet called, this returns the time elapsed since the last call to start(). Note that this method must be called synchronously by all processes of the simulation...

References cpuTimeElapsed().

void Ewoms::Timer::halt ( )
inline

Stop the measurement and always return 0 for all timing values.

Referenced by Ewoms::NewtonMethod< TypeTag >::apply(), and Timer().

double Ewoms::Timer::realTimeElapsed ( ) const
inline
void Ewoms::Timer::start ( )
inline
void Ewoms::Timer::stop ( )
inline

Stop counting the time resources used by the simulation.

Referenced by Ewoms::NewtonMethod< TypeTag >::apply(), Ewoms::Simulator< TypeTag >::run(), and Ewoms::FvBaseDiscretization< TypeTag >::update().


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