RAII-style object that outputs timing information to logs.
More...
#include <timer.h>
|
| | Timer (std::string prefix, std::string end_msg, BCLog::LogFlags log_category=BCLog::LogFlags::ALL, bool msg_on_completion=true) |
| | If log_category is left as the default, end_msg will log unconditionally (instead of being filtered by category). More...
|
| |
| | ~Timer () |
| |
| void | Log (const std::string &msg) |
| |
| std::string | LogMsg (const std::string &msg) |
| |
template<typename TimeType>
class BCLog::Timer< TimeType >
RAII-style object that outputs timing information to logs.
Definition at line 22 of file timer.h.
◆ Timer()
template<typename TimeType>
If log_category is left as the default, end_msg will log unconditionally (instead of being filtered by category).
Definition at line 27 of file timer.h.
◆ ~Timer()
template<typename TimeType>
◆ Log()
template<typename TimeType>
| void BCLog::Timer< TimeType >::Log |
( |
const std::string & |
msg | ) |
|
|
inline |
◆ LogMsg()
template<typename TimeType>
| std::string BCLog::Timer< TimeType >::LogMsg |
( |
const std::string & |
msg | ) |
|
|
inline |
◆ m_log_category
template<typename TimeType>
Forwarded on to LogPrint if specified - has the effect of only outputting the timing log when a particular debug= category is specified.
Definition at line 90 of file timer.h.
◆ m_message_on_completion
template<typename TimeType>
| const bool BCLog::Timer< TimeType >::m_message_on_completion |
|
private |
Whether to output the message again on completion.
Definition at line 93 of file timer.h.
◆ m_prefix
template<typename TimeType>
Log prefix; usually the name of the function this was created in.
Definition at line 83 of file timer.h.
◆ m_start_t
template<typename TimeType>
| std::chrono::microseconds BCLog::Timer< TimeType >::m_start_t {} |
|
private |
◆ m_title
template<typename TimeType>
A descriptive message of what is being timed.
Definition at line 86 of file timer.h.
The documentation for this class was generated from the following file: