LifeV
LifeChrono Class Reference

#include <LifeChrono.hpp>

+ Collaboration diagram for LifeChrono:

Public Types

typedef Epetra_Comm comm_Type
 
typedef std::shared_ptr< comm_TypecommPtr_Type
 

Constructor

 LifeChrono ()
 

Public methods

void reset ()
 
void start ()
 Start the timer. More...
 
void stop ()
 Stop the timer. More...
 
Real diff ()
 Compute the difference in time between start and stop. More...
 
Real globalDiff (const comm_Type &comm)
 Compute the global difference in time between start and stop for all the processes in the communicator. More...
 
Real diffCumul ()
 Return a cumulative time difference. More...
 

Private members

clock_t M_t1
 
clock_t M_t2
 
clock_t M_dt
 
bool M_running
 

Detailed Description

This class is used for timing sections of code

Definition at line 59 of file LifeChrono.hpp.

Member Typedef Documentation

◆ comm_Type

typedef Epetra_Comm comm_Type

Definition at line 66 of file LifeChrono.hpp.

◆ commPtr_Type

typedef std::shared_ptr< comm_Type > commPtr_Type

Definition at line 67 of file LifeChrono.hpp.

Constructor & Destructor Documentation

◆ LifeChrono()

LifeChrono ( )
inline

Definition at line 73 of file LifeChrono.hpp.

+ Here is the caller graph for this function:

Member Function Documentation

◆ reset()

void reset ( )
inline

Definition at line 84 of file LifeChrono.hpp.

+ Here is the caller graph for this function:

◆ start()

void start ( )
inline

Start the timer.

Definition at line 93 of file LifeChrono.hpp.

+ Here is the caller graph for this function:

◆ stop()

void stop ( )
inline

Stop the timer.

Definition at line 100 of file LifeChrono.hpp.

+ Here is the caller graph for this function:

◆ diff()

Real diff ( )
inline

Compute the difference in time between start and stop.

Definition at line 111 of file LifeChrono.hpp.

+ Here is the caller graph for this function:

◆ globalDiff()

Real globalDiff ( const comm_Type comm)
inline

Compute the global difference in time between start and stop for all the processes in the communicator.

Parameters
commthe global communicator
Returns
elapsed time

Definition at line 126 of file LifeChrono.hpp.

◆ diffCumul()

Real diffCumul ( )
inline

Return a cumulative time difference.

Definition at line 146 of file LifeChrono.hpp.

+ Here is the caller graph for this function:

Field Documentation

◆ M_t1

clock_t M_t1
private

Definition at line 160 of file LifeChrono.hpp.

◆ M_t2

clock_t M_t2
private

Definition at line 160 of file LifeChrono.hpp.

◆ M_dt

clock_t M_dt
private

Definition at line 160 of file LifeChrono.hpp.

◆ M_running

bool M_running
private

Definition at line 161 of file LifeChrono.hpp.


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