mirror of
https://github.com/esphome/esphome.git
synced 2026-03-01 10:24:19 -07:00
420ecb4efd512e7e9d8a1369f9b4850f47d4b20a
On ESP32, millis() truncates esp_timer_get_time() to 32-bit, then Scheduler::millis_64_() reconstructs 64-bit using 193 bytes of CAS/atomic/lock rollover tracking code. This is unnecessary since esp_timer_get_time() already provides native 64-bit microseconds. Add millis_64() as a HAL-level function alongside millis(): - ESP32: native esp_timer_get_time()/1000 (26 bytes, lock-free) - Other platforms: delegate to Scheduler::millis_64_impl_() which retains the existing rollover tracking (renamed from millis_64_) Saves 344 bytes flash and ~8 bytes RAM on ESP32 by eliminating the rollover tracking code and associated atomic fields. External callers (uptime, web_server) now use millis_64() directly instead of App.scheduler.millis_64().
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
524 MiB
Languages
C++
64.1%
Python
35.5%
C
0.3%
