mirror of
https://github.com/esphome/esphome.git
synced 2026-03-01 10:24:19 -07:00
Merge remote-tracking branch 'origin/millis64-hal' into integration
This commit is contained in:
@@ -120,10 +120,10 @@ class Scheduler {
|
||||
/// Get 64-bit millisecond timestamp (handles 32-bit millis() rollover)
|
||||
uint64_t millis_64() { return esphome::millis_64(); }
|
||||
|
||||
// Calculate when the next scheduled item should run
|
||||
// @param now Unused, kept for API compatibility
|
||||
// Returns the time in milliseconds until the next scheduled item, or nullopt if no items
|
||||
// This method performs cleanup of removed items before checking the schedule
|
||||
// Calculate when the next scheduled item should run.
|
||||
// @param now On ESP32, unused for 64-bit extension (native); on other platforms, extended to 64-bit via rollover.
|
||||
// Returns the time in milliseconds until the next scheduled item, or nullopt if no items.
|
||||
// This method performs cleanup of removed items before checking the schedule.
|
||||
// IMPORTANT: This method should only be called from the main thread (loop task).
|
||||
optional<uint32_t> next_schedule_in(uint32_t now);
|
||||
|
||||
@@ -298,7 +298,7 @@ class Scheduler {
|
||||
// On non-ESP32 platforms, millis_64() HAL function delegates to this method
|
||||
// which tracks 32-bit millis() rollover using millis_major_ and last_millis_.
|
||||
// On ESP32, millis_64() uses esp_timer_get_time() directly.
|
||||
friend uint64_t millis_64();
|
||||
friend uint64_t ::esphome::millis_64();
|
||||
uint64_t millis_64_impl_(uint32_t now);
|
||||
#endif
|
||||
// Cleanup logically deleted items from the scheduler
|
||||
|
||||
Reference in New Issue
Block a user