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

Name

Description

prefix

Text prepended to every log line, usually the caller's function name.

end_msg

Descriptive message of what is being timed, reused in the completion log.

log_category

Category used to filter the completion log; ALL logs unconditionally.

msg_on_completion

Whether to repeat end_msg (rather than a plain "completed") when the timer is destroyed.

Created with MrDocs