Bitcoin ABC 0.30.5
P2P Digital Currency
|
RAII-style object that outputs timing information to logs. More...
#include <timer.h>
Public Member Functions | |
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) |
Private Attributes | |
std::chrono::microseconds | m_start_t {} |
const std::string | m_prefix |
Log prefix; usually the name of the function this was created in. More... | |
const std::string | m_title |
A descriptive message of what is being timed. More... | |
const BCLog::LogFlags | m_log_category |
Forwarded on to LogPrint if specified - has the effect of only outputing the timing log when a particular debug= category is specified. More... | |
const bool | m_message_on_completion |
Whether to output the message again on completion. More... | |
RAII-style object that outputs timing information to logs.
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |