MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / Timer

Method Timer

src/logging/timer.h:28–40  ·  view source on GitHub ↗

If log_category is left as the default, end_msg will log unconditionally (instead of being filtered by category).

Source from the content-addressed store, hash-verified

26 //! If log_category is left as the default, end_msg will log unconditionally
27 //! (instead of being filtered by category).
28 Timer(
29 std::string prefix,
30 std::string end_msg,
31 BCLog::LogFlags log_category = BCLog::LogFlags::ALL,
32 bool msg_on_completion = true)
33 : m_prefix(std::move(prefix)),
34 m_title(std::move(end_msg)),
35 m_log_category(log_category),
36 m_message_on_completion(msg_on_completion)
37 {
38 this->Log(strprintf("%s started", m_title));
39 m_start_t = std::chrono::steady_clock::now();
40 }
41
42 ~Timer()
43 {

Callers

nothing calls this directly

Calls 1

LogMethod · 0.95

Tested by

no test coverage detected