ATLAS Offline Software
Public Member Functions | Private Attributes | Friends | List of all members
Athena::ScopedTimer Class Reference

Helper class to create a "scoped cook timer" without having to declare the CookTimer itself within the scope (see CookTimer documentation) More...

#include <AlgorithmTimer.h>

Collaboration diagram for Athena::ScopedTimer:

Public Member Functions

 ScopedTimer (unsigned int milliseconds)
 
 ~ScopedTimer ()
 

Private Attributes

unsigned int m_timeout
 Timeout in milliseconds. More...
 
AlgorithmTimerm_timer
 AlgorithmTimer instance, set by AlgorithmTimer::start() More...
 

Friends

class AlgorithmTimer
 

Detailed Description

Helper class to create a "scoped cook timer" without having to declare the CookTimer itself within the scope (see CookTimer documentation)

Definition at line 182 of file AlgorithmTimer.h.

Constructor & Destructor Documentation

◆ ScopedTimer()

Athena::ScopedTimer::ScopedTimer ( unsigned int  milliseconds)
inline

Definition at line 185 of file AlgorithmTimer.h.

185 : m_timeout(milliseconds), m_timer(0) {}

◆ ~ScopedTimer()

Athena::ScopedTimer::~ScopedTimer ( )
inline

Definition at line 186 of file AlgorithmTimer.h.

186 { if (m_timer) m_timer->stop(); }

Friends And Related Function Documentation

◆ AlgorithmTimer

friend class AlgorithmTimer
friend

Definition at line 183 of file AlgorithmTimer.h.

Member Data Documentation

◆ m_timeout

unsigned int Athena::ScopedTimer::m_timeout
private

Timeout in milliseconds.

Definition at line 188 of file AlgorithmTimer.h.

◆ m_timer

AlgorithmTimer* Athena::ScopedTimer::m_timer
private

AlgorithmTimer instance, set by AlgorithmTimer::start()

Definition at line 189 of file AlgorithmTimer.h.


The documentation for this class was generated from the following file:
Athena::AlgorithmTimer::stop
unsigned int stop()
Stop the timer and return the time left in [ms].
Definition: AlgorithmTimer.cxx:136
Athena::ScopedTimer::m_timer
AlgorithmTimer * m_timer
AlgorithmTimer instance, set by AlgorithmTimer::start()
Definition: AlgorithmTimer.h:189
Athena::ScopedTimer::m_timeout
unsigned int m_timeout
Timeout in milliseconds.
Definition: AlgorithmTimer.h:188