Timers
Tick Timing
Basic timing, there is nothing much to it. We just need a couple of functions for basic timing. If you are familiar with tick based timing in another RTOS, it’s exactly the same.
1
2
3
4
5
6
7
tickType ts, milliseconds_spent;
ts = xTaskGetTickCount();
< do stuff >
milliseconds_spent = (xTaskGetTickCount() - ts) / portTICK_RATE_MS;
Comments