Timer Class Reference
Inheritance diagram for Timer:
Collaboration diagram for Timer:

Public Member Functions

 TypeInfo ("Timer")
 
 Timer ()
 
 Timer (const word name)
 
 Timer (const word name, Timers *parrent)
 
const wordname () const
 
virtual ~Timer ()
 
virtual void removeParrent ()
 
virtual int32 level () const
 
virtual bool master () const
 
void start ()
 
void end ()
 
bool timerActive () const
 
real lastTime () const
 
real totalTime () const
 
real averageTime () const
 
virtual real accTimersTotal () const
 
virtual bool write (iOstream &os, bool subTree) const
 
virtual bool read (iIstream &is)
 

Protected Types

using timer = std::chrono::high_resolution_clock
 

Protected Attributes

word name_ = "noNameTimer"
 
timer::time_point start_
 
int32 numIteration_ = 0
 
real accTime_ = 0.0
 
real lastTime_ = 0.0
 
Timersparrent_ = nullptr
 

Detailed Description

Definition at line 39 of file Timer.hpp.

Member Typedef Documentation

◆ timer

using timer = std::chrono::high_resolution_clock
protected

Definition at line 43 of file Timer.hpp.

Constructor & Destructor Documentation

◆ Timer() [1/3]

Timer ( )
inline

Definition at line 66 of file Timer.hpp.

◆ Timer() [2/3]

Timer ( const word  name)
inline

Definition at line 68 of file Timer.hpp.

◆ Timer() [3/3]

Timer ( const word  name,
Timers parrent 
)

Definition at line 25 of file Timer.cpp.

References Timers::addToList(), and Timer::parrent_.

Here is the call graph for this function:

◆ ~Timer()

~Timer ( )
virtual

Definition at line 35 of file Timer.cpp.

Member Function Documentation

◆ TypeInfo()

TypeInfo ( "Timer"  )

◆ name()

const word& name ( ) const
inline

Definition at line 77 of file Timer.hpp.

References Timer::name_.

Referenced by Timers::addTimer().

Here is the caller graph for this function:

◆ removeParrent()

virtual void removeParrent ( )
inlinevirtual

Definition at line 84 of file Timer.hpp.

References Timer::parrent_.

◆ level()

pFlow::int32 level ( ) const
virtual

Reimplemented in Timers.

Definition at line 43 of file Timer.cpp.

◆ master()

virtual bool master ( ) const
inlinevirtual

Reimplemented in Timers.

Definition at line 92 of file Timer.hpp.

◆ start()

void start ( )
inline

◆ end()

void end ( )
inline

Definition at line 102 of file Timer.hpp.

References Timer::accTime_, pFlow::count(), Timer::lastTime_, Timer::numIteration_, and Timer::start_.

Referenced by ContactSearch< BaseMethod, WallMapping >::broadSearch(), and sphereInteraction< contactForceModel, geometryMotionModel, contactListType >::iterate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timerActive()

bool timerActive ( ) const
inline

Definition at line 113 of file Timer.hpp.

References Timer::numIteration_.

Referenced by Timers::accTimersTotal().

Here is the caller graph for this function:

◆ lastTime()

real lastTime ( ) const
inline

Definition at line 119 of file Timer.hpp.

References Timer::lastTime_.

◆ totalTime()

real totalTime ( ) const
inline

Definition at line 125 of file Timer.hpp.

References Timer::accTime_.

Referenced by Timers::accTimersTotal(), and Timer::accTimersTotal().

Here is the caller graph for this function:

◆ averageTime()

real averageTime ( ) const
inline

Definition at line 131 of file Timer.hpp.

References Timer::accTime_, pFlow::max(), and Timer::numIteration_.

Here is the call graph for this function:

◆ accTimersTotal()

virtual real accTimersTotal ( ) const
inlinevirtual

Reimplemented in Timers.

Definition at line 138 of file Timer.hpp.

References Timer::totalTime().

Here is the call graph for this function:

◆ write()

bool write ( iOstream os,
bool  subTree 
) const
virtual

Reimplemented in Timers.

Definition at line 52 of file Timer.cpp.

References pFlow::abs(), boldChar, defaultColor, else, greenColor, pFlow::smallValue, and yellowColor.

Referenced by pFlow::operator<<(), and Timers::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read()

virtual bool read ( iIstream is)
inlinevirtual

Reimplemented in Timers.

Definition at line 147 of file Timer.hpp.

Member Data Documentation

◆ name_

word name_ = "noNameTimer"
protected

Definition at line 46 of file Timer.hpp.

Referenced by Timer::name().

◆ start_

timer::time_point start_
protected

Definition at line 49 of file Timer.hpp.

Referenced by Timer::end(), and Timer::start().

◆ numIteration_

int32 numIteration_ = 0
protected

Definition at line 52 of file Timer.hpp.

Referenced by Timer::averageTime(), Timer::end(), and Timer::timerActive().

◆ accTime_

real accTime_ = 0.0
protected

Definition at line 55 of file Timer.hpp.

Referenced by Timer::averageTime(), Timer::end(), and Timer::totalTime().

◆ lastTime_

real lastTime_ = 0.0
protected

Definition at line 58 of file Timer.hpp.

Referenced by Timer::end(), and Timer::lastTime().

◆ parrent_

Timers* parrent_ = nullptr
protected

Definition at line 60 of file Timer.hpp.

Referenced by Timer::removeParrent(), Timer::Timer(), and Timers::Timers().


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