All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Ewoms::Timer Class Reference

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

#include <timer.hh>

Public Member Functions

void start ()
 Start counting the time resources used by the simulation.
 
double stop ()
 Stop counting the time resources. More...
 
void halt ()
 Stop the measurement reset all timing values.
 
void reset ()
 Make the current point in time t=0 but do not change the status of the timer.
 
double realTimeElapsed () const
 Return the real time [s] elapsed during the periods the timer was active since the last reset.
 
double elapsed () const
 This is an alias for realTimeElapsed() More...
 
double cpuTimeElapsed () const
 Return the CPU time [s] used by all threads of the local process for the periods the timer was active.
 
double globalCpuTimeElapsed () const
 Return the CPU time [s] used by all threads of the all processes of program. More...
 
Timeroperator+= (const Timer &other)
 Adds the time of another timer to the current one.
 

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.)

Member Function Documentation

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

This is an alias for realTimeElapsed()

Its main purpose is to make the API of the class a superset of Dune::Timer

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

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

The value returned only differs from cpuTimeElapsed() if MPI is used.

double Ewoms::Timer::stop ( )
inline

Stop counting the time resources.

Returns the wall clock time the timer was active.


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