AutoTimer< Name, Scope > Class Template Reference
|
CPP API
|
mio::timing::AutoTimer< Name, Scope > Class Template Reference
Timer that automatically starts when it is created, and stops when it is destroyed. More...
#include <auto_timer.h>
Collaboration diagram for mio::timing::AutoTimer< Name, Scope >:
Public Member Functions | |
| AutoTimer () | |
| Run the NamedTimer given by the template parameter(s) Name (and Scope). More... | |
| AutoTimer (AutoTimer &&)=delete | |
| AutoTimer (AutoTimer &)=delete | |
| AutoTimer (BasicTimer &timer) | |
| Run the given BasicTimer. Does not take ownership, so mind the timer's lifetime! More... | |
| ~AutoTimer () | |
Private Attributes | |
| BasicTimer & | m_timer |
| Reference to the timer so it can be stopped in AutoTimer's destructor. More... | |
Detailed Description
template<StringLiteral Name, StringLiteral Scope = "">
class mio::timing::AutoTimer< Name, Scope >
Timer that automatically starts when it is created, and stops when it is destroyed.
- Template Parameters
-
Name,Scope The name and scope of a NamedTimer. Do not set these if you want to use a BasicTimer.
Constructor & Destructor Documentation
◆ AutoTimer() [1/4]
template<StringLiteral Name, StringLiteral Scope = "">
|
inline |
Run the NamedTimer given by the template parameter(s) Name (and Scope).
◆ AutoTimer() [2/4]
template<StringLiteral Name, StringLiteral Scope = "">
|
inline |
Run the given BasicTimer. Does not take ownership, so mind the timer's lifetime!
◆ AutoTimer() [3/4]
template<StringLiteral Name, StringLiteral Scope = "">
|
delete |
◆ AutoTimer() [4/4]
template<StringLiteral Name, StringLiteral Scope = "">
|
delete |
◆ ~AutoTimer()
template<StringLiteral Name, StringLiteral Scope = "">
|
inline |
Member Data Documentation
◆ m_timer
template<StringLiteral Name, StringLiteral Scope = "">
|
private |
Reference to the timer so it can be stopped in AutoTimer's destructor.
Generated by