Uptime in millis

mrdebug
Posts: 43
Joined: Sat Jul 27, 2019 8:26 am

Uptime in millis

Postby mrdebug » Sat Jul 27, 2019 8:31 am

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?

papaluna
Posts: 50
Joined: Tue Jan 30, 2018 11:27 am

Re: Uptime in millis

Postby papaluna » Sun Jul 28, 2019 2:33 pm

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
--
Paul.

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: Uptime in millis

Postby ESP_igrr » Sun Jul 28, 2019 2:56 pm

esp_timer_get_time()/1000 ?

mrdebug
Posts: 43
Joined: Sat Jul 27, 2019 8:26 am

Re: Uptime in millis

Postby mrdebug » Mon Jul 29, 2019 7:57 am

Perfect!
Regards.

Who is online

Users browsing this forum: Google [Bot] and 250 guests