diff --git a/examples/system/esp_timer/main/esp_timer_example_main.c b/examples/system/esp_timer/main/esp_timer_example_main.c index bccb6e0bb2..6aa5093ac2 100644 --- a/examples/system/esp_timer/main/esp_timer_example_main.c +++ b/examples/system/esp_timer/main/esp_timer_example_main.c @@ -70,7 +70,7 @@ void app_main(void) int64_t t2 = esp_timer_get_time(); ESP_LOGI(TAG, "Woke up from light sleep, time since boot: %lld us", t2); - assert(abs((t2 - t1) - 500000) < 1000); + assert(llabs((t2 - t1) - 500000) < 1000); /* Let the timer run for a little bit more */ usleep(2000000);