SOFA API  ca665544
Open source framework for multi-physics simuation
sofa::helper::ScopedAdvancedTimer Struct Reference

#include <ScopedAdvancedTimer.h>

Detailed Description

Scoped (RAII) AdvancedTimer to simplify a basic usage Example of use { ///< open a scope to start measuring ScopedAdvancedTimer t("myMeasurement") ... ... } ///< close the scope... the timer t is destructed and the measurement recorded.

Public Attributes

AdvancedTimer::IdStep m_id
 
std::optional< AdvancedTimer::IdObjm_objId
 

Public Member Functions

 ScopedAdvancedTimer (const std::string &message)
 
 ScopedAdvancedTimer (const char *message)
 
template<class T >
 ScopedAdvancedTimer (const char *message, T *obj)
 
 ~ScopedAdvancedTimer ()
 

Attribute details

◆ m_id

AdvancedTimer::IdStep sofa::helper::ScopedAdvancedTimer::m_id

◆ m_objId

std::optional<AdvancedTimer::IdObj> sofa::helper::ScopedAdvancedTimer::m_objId

Constructor details

◆ ScopedAdvancedTimer() [1/3]

sofa::helper::ScopedAdvancedTimer::ScopedAdvancedTimer ( const std::string &  message)
explicit

◆ ScopedAdvancedTimer() [2/3]

sofa::helper::ScopedAdvancedTimer::ScopedAdvancedTimer ( const char message)
explicit

◆ ScopedAdvancedTimer() [3/3]

template<class T >
sofa::helper::ScopedAdvancedTimer::ScopedAdvancedTimer ( const char message,
T *  obj 
)
explicit

◆ ~ScopedAdvancedTimer()

sofa::helper::ScopedAdvancedTimer::~ScopedAdvancedTimer ( )