mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
examples, timer: use llabs() 64-bit argument
This commit is contained in:
parent
bf3892acee
commit
1f5bb083b9
@ -70,7 +70,7 @@ void app_main(void)
|
|||||||
int64_t t2 = esp_timer_get_time();
|
int64_t t2 = esp_timer_get_time();
|
||||||
ESP_LOGI(TAG, "Woke up from light sleep, time since boot: %lld us", t2);
|
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 */
|
/* Let the timer run for a little bit more */
|
||||||
usleep(2000000);
|
usleep(2000000);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user