MCPcopy Create free account
hub / github.com/ElementsProject/elements / Timer

Method Timer

src/logging/timer.h:27–39  ·  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

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

Callers

nothing calls this directly

Calls 1

LogMethod · 0.95

Tested by

no test coverage detected