diff --git a/cores/arduino/zephyrCommon.cpp b/cores/arduino/zephyrCommon.cpp index dd670fe54..d2cfa3575 100644 --- a/cores/arduino/zephyrCommon.cpp +++ b/cores/arduino/zephyrCommon.cpp @@ -347,7 +347,11 @@ void delayMicroseconds(unsigned int us) { } unsigned long micros(void) { +#ifdef CONFIG_TIMER_HAS_64BIT_CYCLE_COUNTER + return k_cyc_to_us_floor32(k_cycle_get_64()); +#else return k_cyc_to_us_floor32(k_cycle_get_32()); +#endif } unsigned long millis(void) {