Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get time since boot in FreeRTOS

Tags:

freertos

I'm using http://www.freertos.org/ for an application, but I can't find how to get the system time since boot. I can create a task and keep updating a counter, but I don't think it will be a good thing since the scheduler might schedule down my task (and putting a higher priority might hang my 'real' work tasks).

So, I want to know what might be the best solution to get how many ms elapsed since the system boot up.

like image 485
Alexandre Leites Avatar asked Mar 16 '23 22:03

Alexandre Leites


1 Answers

I think xTaskGetTickCount() does what you want: http://www.freertos.org/a00021.html#xTaskGetTickCount

like image 132
Richard Avatar answered May 12 '23 16:05

Richard