tlx
ScopedMultiTimerSwitch Class Reference

RAII Scoped MultiTimer switcher: switches the timer of a MultiTimer on construction and back to old one on destruction. More...

#include <multi_timer.hpp>

Public Member Functions

 ScopedMultiTimerSwitch (MultiTimer &timer, const char *new_timer)
 construct and timer to switch to More...
 
 ~ScopedMultiTimerSwitch ()
 change back timer to previous timer. More...
 

Protected Attributes

MultiTimertimer_
 reference to MultiTimer More...
 
const char * previous_
 previous timer, used to switch back to on destruction More...
 

Detailed Description

RAII Scoped MultiTimer switcher: switches the timer of a MultiTimer on construction and back to old one on destruction.

Definition at line 115 of file multi_timer.hpp.

Constructor & Destructor Documentation

◆ ScopedMultiTimerSwitch()

ScopedMultiTimerSwitch ( MultiTimer timer,
const char *  new_timer 
)

construct and timer to switch to

Definition at line 155 of file multi_timer.cpp.

◆ ~ScopedMultiTimerSwitch()

change back timer to previous timer.

Definition at line 161 of file multi_timer.cpp.

Member Data Documentation

◆ previous_

const char* previous_
protected

previous timer, used to switch back to on destruction

Definition at line 129 of file multi_timer.hpp.

◆ timer_

MultiTimer& timer_
protected

reference to MultiTimer

Definition at line 126 of file multi_timer.hpp.


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