diff --git a/examples/get-started/hello_world/main/hello_world_main.c b/examples/get-started/hello_world/main/hello_world_main.c index 1bbb227..06ce1bf 100644 --- a/examples/get-started/hello_world/main/hello_world_main.c +++ b/examples/get-started/hello_world/main/hello_world_main.c @@ -12,6 +12,9 @@ #include "freertos/task.h" #include "esp_system.h" #include "esp_spi_flash.h" +#include +#include +#include // for PRId64 void app_main(void) { @@ -33,6 +36,16 @@ void app_main(void) printf("Free heap: %d\n", esp_get_free_heap_size()); +printf("\n"); + struct timeval tv_now; + gettimeofday(&tv_now, NULL); + int64_t time_us = (int64_t)tv_now.tv_sec * 1000000L + (int64_t)tv_now.tv_usec; + printf("tv_now.tv_sec %ld\n", (long)tv_now.tv_sec); + printf("PRId64 tv_now.tv_sec %" PRId64 "\n", (int64_t)tv_now.tv_sec); + printf("tv_now.tv_usec %" PRId64 "\n", (int64_t)tv_now.tv_usec); + printf("time_us %" PRId64 "\n", time_us); +printf("\n"); + for (int i = 10; i >= 0; i--) { printf("Restarting in %d seconds...\n", i); vTaskDelay(1000 / portTICK_PERIOD_MS);