diff --git a/libraries/AP_HAL_ESP32/system.cpp b/libraries/AP_HAL_ESP32/system.cpp index 4ee607c561..021b921dc1 100644 --- a/libraries/AP_HAL_ESP32/system.cpp +++ b/libraries/AP_HAL_ESP32/system.cpp @@ -15,6 +15,7 @@ #include #include +#include #include "SdCard.h" #include @@ -51,7 +52,7 @@ uint64_t micros64() uint64_t millis64() { - return micros64()/1000; + return uint64_div1000(micros64()); } } // namespace AP_HAL