From 9b3800c8679b57836cfa64ea5f9fca9609367d20 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 27 Feb 2026 11:39:34 -1000 Subject: [PATCH] Guard TAG, log.h, and cinttypes behind ESPHOME_DEBUG_SCHEDULER These are only used in debug rollover logging. Guarding them avoids unused variable warnings and unnecessary includes in normal builds. Co-Authored-By: Claude Opus 4.6 --- esphome/core/time_64.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/esphome/core/time_64.cpp b/esphome/core/time_64.cpp index 60bcc95773..db5df25eb9 100644 --- a/esphome/core/time_64.cpp +++ b/esphome/core/time_64.cpp @@ -5,16 +5,20 @@ #include "time_64.h" #include "esphome/core/helpers.h" +#ifdef ESPHOME_DEBUG_SCHEDULER #include "esphome/core/log.h" +#include +#endif #ifdef ESPHOME_THREAD_MULTI_ATOMICS #include #endif -#include #include namespace esphome { +#ifdef ESPHOME_DEBUG_SCHEDULER static const char *const TAG = "time_64"; +#endif uint64_t Millis64Impl::compute(uint32_t now) { // Half the 32-bit range - used to detect rollovers vs normal time progression