Timers Class Reference
Inheritance diagram for Timers:
Collaboration diagram for Timers:

Public Member Functions

 TypeInfo ("Timers")
 
 Timers (const word &name)
 
 Timers (const word &name, Timers *parrent)
 
virtual ~Timers ()
 
uniquePtr< TimeraddTimer (const word &name)
 
void addToList (Timer *timer)
 
void removeFromList (Timer *timer)
 
virtual int32 level () const
 
virtual bool master () const
 
real accTimersTotal () const override
 
virtual bool write (iOstream &os, bool subTree=true) const
 
virtual bool read (iIstream &is)
 
- Public Member Functions inherited from Timer
 TypeInfo ("Timer")
 
 Timer ()
 
 Timer (const word name)
 
 Timer (const word name, Timers *parrent)
 
const wordname () const
 
virtual ~Timer ()
 
virtual void removeParrent ()
 
void start ()
 
void end ()
 
bool timerActive () const
 
real lastTime () const
 
real totalTime () const
 
real averageTime () const
 

Protected Attributes

List< pFlow::Timer * > timers_
 
int32 level_ = 0
 
- Protected Attributes inherited from Timer
word name_ = "noNameTimer"
 
timer::time_point start_
 
int32 numIteration_ = 0
 
real accTime_ = 0.0
 
real lastTime_ = 0.0
 
Timersparrent_ = nullptr
 

Additional Inherited Members

- Protected Types inherited from Timer
using timer = std::chrono::high_resolution_clock
 

Detailed Description

Definition at line 33 of file Timers.hpp.

Constructor & Destructor Documentation

◆ Timers() [1/2]

Timers ( const word name)
inline

Definition at line 48 of file Timers.hpp.

◆ Timers() [2/2]

Timers ( const word name,
Timers parrent 
)
inline

Definition at line 53 of file Timers.hpp.

References Timers::level(), Timers::level_, and Timer::parrent_.

Here is the call graph for this function:

◆ ~Timers()

virtual ~Timers ( )
inlinevirtual

Definition at line 63 of file Timers.hpp.

References Timers::timers_.

Member Function Documentation

◆ TypeInfo()

TypeInfo ( "Timers"  )

◆ addTimer()

uniquePtr<Timer> addTimer ( const word name)
inline

Definition at line 72 of file Timers.hpp.

References Timer::name().

Here is the call graph for this function:

◆ addToList()

void addToList ( Timer timer)
inline

Definition at line 78 of file Timers.hpp.

References Timers::timers_.

Referenced by Timer::Timer().

Here is the caller graph for this function:

◆ removeFromList()

void removeFromList ( Timer timer)
inline

Definition at line 83 of file Timers.hpp.

References List< T >::find(), and Timers::timers_.

Here is the call graph for this function:

◆ level()

virtual int32 level ( ) const
inlinevirtual

Reimplemented from Timer.

Definition at line 88 of file Timers.hpp.

References Timers::level_.

Referenced by Timers::Timers().

Here is the caller graph for this function:

◆ master()

virtual bool master ( ) const
inlinevirtual

Reimplemented from Timer.

Definition at line 93 of file Timers.hpp.

Referenced by Timers::accTimersTotal().

Here is the caller graph for this function:

◆ accTimersTotal()

pFlow::real accTimersTotal ( ) const
overridevirtual

Reimplemented from Timer.

Definition at line 24 of file Timers.cpp.

References Timers::master(), Timer::timerActive(), Timers::timers_, and Timer::totalTime().

Here is the call graph for this function:

◆ write()

bool write ( iOstream os,
bool  subTree = true 
) const
virtual

Reimplemented from Timer.

Definition at line 46 of file Timers.cpp.

References Timer::write().

Referenced by pFlow::operator<<().

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

◆ read()

virtual bool read ( iIstream is)
inlinevirtual

Reimplemented from Timer.

Definition at line 103 of file Timers.hpp.

Member Data Documentation

◆ timers_

List<pFlow::Timer*> timers_
protected

◆ level_

int32 level_ = 0
protected

Definition at line 41 of file Timers.hpp.

Referenced by Timers::level(), and Timers::Timers().


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