MRPT
2.0.1
|
A safe way to call enter() and leave() of a mrpt::system::CTimeLogger upon construction and destruction of this auxiliary object, making sure that leave() will be called upon exceptions, etc.
Usage mode #1 (scoped):
Usage mode #2 (unscoped):
Definition at line 189 of file system/CTimeLogger.h.
#include <mrpt/system/CTimeLogger.h>
Public Member Functions | |
CTimeLoggerEntry (const CTimeLogger &logger, const std::string_view §ion_name) | |
~CTimeLoggerEntry () | |
void | stop () |
for correct use, see docs for CTimeLoggerEntry More... | |
Public Attributes | |
CTimeLogger & | m_logger |
Private Attributes | |
const std::string | m_section_name |
mrpt::Clock::time_point | m_entry |
bool | stopped_ {false} |
CTimeLoggerEntry::CTimeLoggerEntry | ( | const CTimeLogger & | logger, |
const std::string_view & | section_name | ||
) |
Definition at line 414 of file CTimeLogger.cpp.
References m_entry, and mrpt::Clock::now().
CTimeLoggerEntry::~CTimeLoggerEntry | ( | ) |
Definition at line 430 of file CTimeLogger.cpp.
References mrpt::exception_to_str(), and stop().
void CTimeLoggerEntry::stop | ( | ) |
for correct use, see docs for CTimeLoggerEntry
Definition at line 420 of file CTimeLogger.cpp.
References m_entry, m_logger, m_section_name, mrpt::Clock::now(), mrpt::system::CTimeLogger::registerUserMeasure(), stopped_, and mrpt::system::timeDifference().
Referenced by ~CTimeLoggerEntry().
|
private |
Definition at line 201 of file system/CTimeLogger.h.
Referenced by CTimeLoggerEntry(), and stop().
CTimeLogger& mrpt::system::CTimeLoggerEntry::m_logger |
Definition at line 194 of file system/CTimeLogger.h.
Referenced by stop().
|
private |
Definition at line 200 of file system/CTimeLogger.h.
Referenced by stop().
|
private |
Definition at line 202 of file system/CTimeLogger.h.
Referenced by stop().
Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020 |