mirror of
https://github.com/esphome/esphome.git
synced 2026-09-19 11:08:38 +00:00
Move HALF_MAX_UINT32 inside compute() function
Only used within the function, matches the pattern of ROLLOVER_WINDOW. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
3d674ae1d2
commit
c9a2fe5b80
@@ -16,10 +16,10 @@ namespace esphome {
|
||||
|
||||
static const char *const TAG = "time_64";
|
||||
|
||||
// Half the 32-bit range - used to detect rollovers vs normal time progression
|
||||
static constexpr uint32_t HALF_MAX_UINT32 = std::numeric_limits<uint32_t>::max() / 2;
|
||||
|
||||
uint64_t Millis64Impl::compute(uint32_t now) {
|
||||
// Half the 32-bit range - used to detect rollovers vs normal time progression
|
||||
static constexpr uint32_t HALF_MAX_UINT32 = std::numeric_limits<uint32_t>::max() / 2;
|
||||
|
||||
// State variables for rollover tracking - static to persist across calls
|
||||
#ifdef ESPHOME_THREAD_MULTI_ATOMICS
|
||||
// Mutex for rollover serialization (taken only every ~49.7 days).
|
||||
|
||||
Reference in New Issue
Block a user