kernel: thread: Fix thread runtime stats
Adding missing parenthesis. Without them wrong results appeared when k_cycle_get_32 wrapped. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
e2427ff671
commit
76c309db7b
1 changed files with 1 additions and 1 deletions
|
@ -1050,7 +1050,7 @@ void z_thread_mark_switched_out(void)
|
|||
diff = timing_cycles_get(&thread->rt_stats.last_switched_in, &now);
|
||||
#else
|
||||
now = k_cycle_get_32();
|
||||
diff = (uint64_t)now - thread->rt_stats.last_switched_in;
|
||||
diff = (uint64_t)(now - thread->rt_stats.last_switched_in);
|
||||
thread->rt_stats.last_switched_in = 0;
|
||||
#endif /* CONFIG_THREAD_RUNTIME_STATS_USE_TIMING_FUNCTIONS */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue