Get total runtime without getting task info

fazjaxton wrote on Friday, January 13, 2017:

I would like to retrieve the total system runtime without needing to allocate memory for a TaskStatus_t for every task in my system. However, the current implementation of uxTaskGetSystemState has the code to set the total runtime inside the check for uxArraySize, so that if you don’t provide the array, you also don’t get the runtime. For a future release, could the runtime be set outside of this check, so that I could do uxTaskGetSystemState (NULL, 0, &runtime) and get just the runtime? Or perhaps another accessor function could be added to get this value.

Thank you!

rtel wrote on Friday, January 13, 2017:

The counter obtained using the method is a high speed clock provided by
the user. If you just want the run time without apportioning the total
time to individual tasks you could just read the tick count value. If
you system runs for a very long time you would also have to counter
overflows.