Where is the definition of function millis() located used for ESP32

esp32-hal-misc.c:

unsigned long IRAM_ATTR millis()
{
    return (unsigned long) (esp_timer_get_time() / 1000ULL);
}

Of course, that just begs the question .... why would you ever use millis() on an ESP32? The esp_timer_get_time() function returns a 64-bit integer, has microsecond-resolution, and won't roll over for more than 290,000 years.

1 Like