![]() |
Bitcoin Core 30.99.0
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::optional< std::chrono::steady_clock::time_point > | 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 LogDebug if specified - has the effect of only outputting 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 |