Page 1 of 1

Uptime in millis

Posted: Sat Jul 27, 2019 8:31 am
by mrdebug
Hi, I need the uptime in millis.
I'm using this line of code

Code: Select all

esp_timer_get_time
but doesn't seems to be in millis.
Can you suggest me the right way?

Re: Uptime in millis

Posted: Sun Jul 28, 2019 2:33 pm
by papaluna
I see 2 possibilities:

1. esp_log_timestamp()
https://docs.espressif.com/projects/esp ... timestampv
This also includes the time in the bootloader.

2. xTaskGetTickCount() * portTICK_PERIOD_MS
https://docs.espressif.com/projects/esp ... TickCountv

Re: Uptime in millis

Posted: Sun Jul 28, 2019 2:56 pm
by ESP_igrr
esp_timer_get_time()/1000 ?

Re: Uptime in millis

Posted: Mon Jul 29, 2019 7:57 am
by mrdebug
Perfect!
Regards.