mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-12-16 08:14:35 -05:00
refactoring
This commit is contained in:
parent
948d8d947e
commit
4ff92be23b
2 changed files with 3 additions and 6 deletions
|
|
@ -126,12 +126,9 @@ void update_performance_counters() {
|
||||||
if ((((chTimeNow()>>10) & 0x01) == 0x01) == last_paint_state)
|
if ((((chTimeNow()>>10) & 0x01) == 0x01) == last_paint_state)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
volatile auto idle_thread = chSysGetIdleThread();
|
// Idle thread state is sometimes unuseable
|
||||||
if (chThdGetTicks(idle_thread) > 0x10000000) {
|
if (chThdGetTicks(chSysGetIdleThread()) > 0x10000000)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
idle_thread = nullptr;
|
|
||||||
|
|
||||||
last_paint_state = !last_paint_state;
|
last_paint_state = !last_paint_state;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,4 @@
|
||||||
|
|
||||||
uint8_t get_cpu_utilisation_in_percent();
|
uint8_t get_cpu_utilisation_in_percent();
|
||||||
|
|
||||||
#endif /* __PERFORMANCE_COUNTER_H__ */
|
#endif /* __PERFORMANCE_COUNTER_H__ */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue