mirror of
https://github.com/esphome/esphome.git
synced 2026-09-18 02:28:42 +00:00
4e05d39f4b9c26621b56270e35a3749ad0d906f3
scheduler_tick_ now returns the scheduler's advanced timestamp (free via PR #15830's Scheduler::call return). Previously we still used the pre-scheduler millis() for `elapsed = now - last_loop_`, which underestimated elapsed time by whatever the scheduler dispatch took. Adopt the returned value as `now` so the gate check, WDT feed, runtime stats, and sleep computation all see consistent post-scheduler time. Drops the obsolete "we deliberately reuse pre-scheduler now" comment — that rationale was predicated on saving a millis() call, which no longer applies.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
598 MiB
Languages
C++
55.7%
Python
43.7%
C
0.3%
JavaScript
0.2%
