aboutsummaryrefslogtreecommitdiff
path: root/src/logging/timer.h
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2021-09-11 20:47:07 +0200
committerJon Atack <jon@atack.com>2021-10-05 17:28:02 +0200
commitec65bed00ee2e403e39b3c5977caf4abd31ccc87 (patch)
tree4cbcf925cb1aab1d4d9656ac66c458c1092c39a5 /src/logging/timer.h
parent325da75a5396f3161a6eade74b349105ed5722ab (diff)
log, timer: add LOG_TIME_MILLIS_WITH_CATEGORY_MSG_ONCE macro
that prints the descriptive message when logging the start but not when logging the completion.
Diffstat (limited to 'src/logging/timer.h')
-rw-r--r--src/logging/timer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/logging/timer.h b/src/logging/timer.h
index 6725c71a95..b77a0e17c7 100644
--- a/src/logging/timer.h
+++ b/src/logging/timer.h
@@ -100,6 +100,8 @@ private:
BCLog::Timer<std::chrono::microseconds> PASTE2(logging_timer, __COUNTER__)(__func__, end_msg, log_category)
#define LOG_TIME_MILLIS_WITH_CATEGORY(end_msg, log_category) \
BCLog::Timer<std::chrono::milliseconds> PASTE2(logging_timer, __COUNTER__)(__func__, end_msg, log_category)
+#define LOG_TIME_MILLIS_WITH_CATEGORY_MSG_ONCE(end_msg, log_category) \
+ BCLog::Timer<std::chrono::milliseconds> PASTE2(logging_timer, __COUNTER__)(__func__, end_msg, log_category, /* msg_on_completion=*/false)
#define LOG_TIME_SECONDS(end_msg) \
BCLog::Timer<std::chrono::seconds> PASTE2(logging_timer, __COUNTER__)(__func__, end_msg)