From ec65bed00ee2e403e39b3c5977caf4abd31ccc87 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Sat, 11 Sep 2021 20:47:07 +0200 Subject: [PATCH] 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. --- src/logging/timer.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/logging/timer.h b/src/logging/timer.h index 6725c71a959..b77a0e17c7c 100644 --- a/src/logging/timer.h +++ b/src/logging/timer.h @@ -100,6 +100,8 @@ private: BCLog::Timer PASTE2(logging_timer, __COUNTER__)(__func__, end_msg, log_category) #define LOG_TIME_MILLIS_WITH_CATEGORY(end_msg, log_category) \ BCLog::Timer PASTE2(logging_timer, __COUNTER__)(__func__, end_msg, log_category) +#define LOG_TIME_MILLIS_WITH_CATEGORY_MSG_ONCE(end_msg, log_category) \ + BCLog::Timer PASTE2(logging_timer, __COUNTER__)(__func__, end_msg, log_category, /* msg_on_completion=*/false) #define LOG_TIME_SECONDS(end_msg) \ BCLog::Timer PASTE2(logging_timer, __COUNTER__)(__func__, end_msg)