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 <noreply@anthropic.com>
This commit is contained in:
J. Nick Koston
2026-02-27 11:39:34 -10:00
parent f9d6df5403
commit 9b3800c867

View File

@@ -5,16 +5,20 @@
#include "time_64.h"
#include "esphome/core/helpers.h"
#ifdef ESPHOME_DEBUG_SCHEDULER
#include "esphome/core/log.h"
#include <cinttypes>
#endif
#ifdef ESPHOME_THREAD_MULTI_ATOMICS
#include <atomic>
#endif
#include <cinttypes>
#include <limits>
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