Thrill  0.1
ScopedMultiTimer Class Reference

Detailed Description

Independent RAII Scoped MultiTimer: contains a MultiTimer which is started with the given timer, and added to the base MultiTimer on destruction.

Definition at line 126 of file multi_timer.hpp.

+ Collaboration diagram for ScopedMultiTimer:

#include <multi_timer.hpp>

Public Member Functions

 ScopedMultiTimer (MultiTimer &base, const char *timer)
 construct and change timer to tm More...
 ~ScopedMultiTimer ()
 change back timer to previous timer. More...

Protected Attributes

 reference to base timer More...
MultiTimer timer_
 contained independent timer More...

Constructor & Destructor Documentation

◆ ScopedMultiTimer()

ScopedMultiTimer ( MultiTimer base,
const char *  timer 

construct and change timer to tm

Definition at line 160 of file multi_timer.cpp.

References MultiTimer::start(), and ScopedMultiTimer::timer_.

◆ ~ScopedMultiTimer()

change back timer to previous timer.

Definition at line 165 of file multi_timer.cpp.

References MultiTimer::add(), ScopedMultiTimer::base_, MultiTimer::stop(), and ScopedMultiTimer::timer_.

Member Data Documentation

◆ base_

MultiTimer& base_

reference to base timer

Definition at line 137 of file multi_timer.hpp.

Referenced by ScopedMultiTimer::~ScopedMultiTimer().

◆ timer_

MultiTimer timer_

contained independent timer

Definition at line 140 of file multi_timer.hpp.

Referenced by ScopedMultiTimer::ScopedMultiTimer(), and ScopedMultiTimer::~ScopedMultiTimer().

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