ulTotalRunTime = portGET_RUN_TIME_COUNTER_VALUE();\r
#endif\r
\r
+ /* Divide ulTotalRunTime by 100 to make the percentage caluclations\r
+ simpler in the prvGenerateRunTimeStatsForTasksInList() function. */\r
+ ulTotalRunTime /= 100UL;\r
+ \r
/* Run through all the lists that could potentially contain a TCB,\r
generating a table of run timer percentages in the provided\r
buffer. */\r
}\r
else\r
{\r
- /* What percentage of the total run time as the task used?\r
- This will always be rounded down to the nearest integer. */\r
- ulStatsAsPercentage = ( 100UL * pxNextTCB->ulRunTimeCounter ) / ulTotalRunTime;\r
+ /* What percentage of the total run time has the task used?\r
+ This will always be rounded down to the nearest integer. \r
+ ulTotalRunTime has already been divided by 100. */\r
+ ulStatsAsPercentage = pxNextTCB->ulRunTimeCounter / ulTotalRunTime;\r
\r
if( ulStatsAsPercentage > 0UL )\r
{\r