Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::ITimerMng Class Referenceabstract

Interface of a timer manager. More...

#include <arcane/core/ITimerMng.h>

Inheritance diagram for Arcane::ITimerMng:
Collaboration diagram for Arcane::ITimerMng:

Public Member Functions

virtual ~ITimerMng ()=default
 Frees resources.
virtual void beginTimer (Timer *timer)=0
 Attaches the timer timer to this manager.
virtual Real endTimer (Timer *timer)=0
 Releases the timer timer.
virtual Real getTime (Timer *timer)=0
 Time elapsed since the last call to beginTimer().
virtual bool hasTimer (Timer *timer)=0
 Indicates if the timer timer is registered.

Detailed Description

Interface of a timer manager.

This manager is used exclusively by the architecture's timers (Timer) and must not be used directly.

A timer uses the beginTimer() method to indicate to this manager that it wishes to start a time measurement, and the endTimer() method to indicate that the measurement is finished and to obtain the time elapsed since the call to beginTimer(). It is also possible to obtain the elapsed time without stopping the timer by calling the getTime() function.

Timers of the same type nest within each other and must respect the stack principle for calls to beginTimer() and endTimer(): the timer calling endTimer() must be the last one to have called beginTimer().

The type of time used is determined by Timer::type(). It is either CPU time or real time.

Definition at line 49 of file ITimerMng.h.

Constructor & Destructor Documentation

◆ ~ITimerMng()

virtual Arcane::ITimerMng::~ITimerMng ( )
virtualdefault

Frees resources.

Precondition
!hasTimer()

Member Function Documentation

◆ beginTimer()

virtual void Arcane::ITimerMng::beginTimer ( Timer * timer)
pure virtual

Attaches the timer timer to this manager.

Precondition
!timer
!hasTimer(timer)
Postcondition
hasTimer(timer)

Implemented in Arcane::TimerMng.

◆ endTimer()

virtual Real Arcane::ITimerMng::endTimer ( Timer * timer)
pure virtual

Releases the timer timer.

Returns
the time elapsed since the call to beginTimer().
Precondition
!timer
hasTimer(timer)
Postcondition
!hasTimer(timer)

Implemented in Arcane::TimerMng.

◆ getTime()

virtual Real Arcane::ITimerMng::getTime ( Timer * timer)
pure virtual

Time elapsed since the last call to beginTimer().

Precondition
!timer
hasTimer(timer)

Implemented in Arcane::TimerMng.

◆ hasTimer()

virtual bool Arcane::ITimerMng::hasTimer ( Timer * timer)
pure virtual

Indicates if the timer timer is registered.

Precondition
!timer
Deprecated
This function will eventually be removed. Do not use it.

Implemented in Arcane::TimerMng.

References hasTimer().

Referenced by hasTimer().

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

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