Interface of a timer manager. More...
#include <arcane/core/ITimerMng.h>
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. | |
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.
|
virtualdefault |
Frees resources.
|
pure virtual |
Attaches the timer timer to this manager.
Releases the timer timer.
Time elapsed since the last call to beginTimer().
|
pure virtual |
Indicates if the timer timer is registered.
References hasTimer().
Referenced by hasTimer().