Loading...
Searching...
No Matches
Opm::Timer Class Reference

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

`#include <timer.hpp>`

## Public Member Functions

void | start ()
| Start counting the time resources used by the simulation.
double | stop ()
| Stop counting the time resources.
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().
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.
Timer & | operator+= (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

## elapsed()

double Opm::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

## globalCpuTimeElapsed()

double Opm::Timer::globalCpuTimeElapsed | ( |  | ) | const

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.

## stop()

double Opm::Timer::stop | ( |  | ) |

Stop counting the time resources.

Returns the wall clock time the timer was active.

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

- opm/models/utils/timer.hpp
- opm/models/utils/timer.cpp