Update perf_counter.h

This commit is contained in:
Gabriel Wang 2021-12-30 14:18:58 +00:00
parent bd10f2fcc3
commit a2483b2669

View File

@ -274,7 +274,7 @@
__cpu_usage__.lTaskUsedCycles = stop_task_cycle_counter(); \ __cpu_usage__.lTaskUsedCycles = stop_task_cycle_counter(); \
\ \
if (__PLOOC_VA_NUM_ARGS(__VA_ARGS__) == 0) { \ if (__PLOOC_VA_NUM_ARGS(__VA_ARGS__) == 0) { \
printf("%s CPU Usage %2.3f %%", __func__, \ printf("%s CPU Usage %2.3f%%\r\n", __func__, \
(float)((double)__cpu_usage__.lTaskUsedCycles * 100.0 / \ (float)((double)__cpu_usage__.lTaskUsedCycles * 100.0 / \
(double)__cpu_usage__.lTimeElapsed)); \ (double)__cpu_usage__.lTimeElapsed)); \
} else { \ } else { \