mirror of
https://github.com/esphome/esphome.git
synced 2025-09-06 21:32:21 +01:00
Update esphome/core/scheduler.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -95,9 +95,10 @@ class Scheduler {
|
|||||||
} name_;
|
} name_;
|
||||||
uint32_t interval;
|
uint32_t interval;
|
||||||
// Split time to handle millis() rollover. The scheduler combines the 32-bit millis()
|
// Split time to handle millis() rollover. The scheduler combines the 32-bit millis()
|
||||||
// with a 16-bit rollover counter to create a 48-bit time space (stored as 64-bit
|
// with a 16-bit rollover counter to create a 48-bit time space (using 32+16 bits).
|
||||||
// for compatibility). With 49.7 days per 32-bit rollover, the 16-bit counter
|
// This is intentionally limited to 48 bits, not stored as a full 64-bit value.
|
||||||
// supports 49.7 days × 65536 = ~8900 years. This ensures correct scheduling
|
// With 49.7 days per 32-bit rollover, the 16-bit counter supports
|
||||||
|
// 49.7 days × 65536 = ~8900 years. This ensures correct scheduling
|
||||||
// even when devices run for months. Split into two fields for better memory
|
// even when devices run for months. Split into two fields for better memory
|
||||||
// alignment on 32-bit systems.
|
// alignment on 32-bit systems.
|
||||||
uint32_t next_execution_low_; // Lower 32 bits of execution time (millis value)
|
uint32_t next_execution_low_; // Lower 32 bits of execution time (millis value)
|
||||||
|
Reference in New Issue
Block a user