Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::Timer::Sentry Class Reference

Sentinel for the timer. The sentinel associated with a timer allows it to be triggered upon its construction and stopped upon its destruction. This ensures that the timer will be properly stopped in case of an exception, for example. More...

#include <arcane/core/Timer.h>

Collaboration diagram for Arcane::Timer::Sentry:

Public Member Functions

 Sentry (Timer *t)
 Associates the timer t and starts it.
 ~Sentry ()
 Stops the associated timer.

Private Attributes

Timerm_timer
 Associated timer.

Detailed Description

Sentinel for the timer. The sentinel associated with a timer allows it to be triggered upon its construction and stopped upon its destruction. This ensures that the timer will be properly stopped in case of an exception, for example.

Definition at line 89 of file Timer.h.

Constructor & Destructor Documentation

◆ Sentry()

Arcane::Timer::Sentry::Sentry ( Timer * t)
inline

Associates the timer t and starts it.

Definition at line 94 of file Timer.h.

References m_timer, and Arcane::Timer::Timer().

Here is the call graph for this function:

◆ ~Sentry()

Arcane::Timer::Sentry::~Sentry ( )
inline

Stops the associated timer.

Definition at line 100 of file Timer.h.

References m_timer.

Member Data Documentation

◆ m_timer

Timer* Arcane::Timer::Sentry::m_timer
private

Associated timer.

Definition at line 107 of file Timer.h.

Referenced by Sentry(), and ~Sentry().


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