Does one know if it is possible to find out how much a task (or all tasks) have been running for a period of time. That is I would like to have something like:
In the last x second
Task A has run 23 ms
Task B has run 281 ms
Task C has run 0 ms
Task idle has run 900 ms
INT 1 has run 100 us
…
Then somewhere (e.g. in the idle task), regularly read out the task_time values from all your tTaskData structs. You can obviously easily get percentages by dividing each time by the total and you can get an overall system busy percentage (e.g. like in the Windows task manager) based on the idle task, i.e. if the idle task gets 100% of the time then the system is 0% busy, if the idle task only gets 5% then the system is 95% busy, etc.