From 31aa00f1d5d988705b5f2a79be41b7503eae120a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 11 Apr 2026 22:38:29 -1000 Subject: [PATCH] [rp2040] Add USE_FAST_MILLIS_ACCUMULATOR define for benchmark guard --- esphome/components/rp2040/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/components/rp2040/__init__.py b/esphome/components/rp2040/__init__.py index 4f4244a8d5..a34f04c8e5 100644 --- a/esphome/components/rp2040/__init__.py +++ b/esphome/components/rp2040/__init__.py @@ -226,6 +226,7 @@ async def to_code(config): # Wrap Arduino's millis() so all callers use our fast accumulator instead of # the expensive time_us_64() + micros_to_millis() 64-bit conversion path. cg.add_build_flag("-Wl,--wrap=millis") + cg.add_define("USE_FAST_MILLIS_ACCUMULATOR") cg.add_platformio_option("board_build.core", "earlephilhower") # In testing mode, use all flash for sketch to allow linking grouped component tests.