BCLog::Timer::Timer

Constructs the timer, records the start time, and logs a "started" message.

Synopsis

Declared in <logging/timer.h>

Timer(
    std::string prefix,
    std::string end_msg,
    BCLog::LogFlags log_category = BCLog::LogFlags::ALL,
    bool msg_on_completion = true);

Description

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

Parameters

NameDescription
prefixText prepended to every log line, usually the caller's function name.
end_msgDescriptive message of what is being timed, reused in the completion log.
log_categoryCategory used to filter the completion log; ALL logs unconditionally.
msg_on_completionWhether to repeat end_msg (rather than a plain "completed") when the timer is destroyed.