mirror of
https://github.com/esphome/esphome.git
synced 2026-09-15 17:18:40 +00:00
When curr_time (from millis()) is less than started_ (the `now` passed to scheduler.call()), the subtraction wraps to a huge value (~4 billion). This triggers spurious blocking warnings with nonsensical times. This can happen when the scheduler's execute_item_() returns a millis() value that subsequent items use as their guard start, but the next scheduler.call() passes a `now` value from a slightly different source. Fix by skipping the blocking check when curr_time < started_ (underflow). Also restore the scheduler firing benchmark to use intervals with monotonically increasing fake time, now that the guard handles underflow.