HAL_SITL: don't run IO at more than 100Hz
save some CPU for faster frame rates
This commit is contained in:
parent
4ed02c3c94
commit
7def86ae96
@ -215,7 +215,10 @@ void Scheduler::_run_io_procs(bool called_from_isr)
|
||||
void Scheduler::stop_clock(uint64_t time_usec)
|
||||
{
|
||||
_stopped_clock_usec = time_usec;
|
||||
_run_io_procs(false);
|
||||
if (time_usec - _last_io_run > 10000) {
|
||||
_last_io_run = time_usec;
|
||||
_run_io_procs(false);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -73,5 +73,6 @@ private:
|
||||
|
||||
bool _initialized;
|
||||
uint64_t _stopped_clock_usec;
|
||||
uint64_t _last_io_run;
|
||||
};
|
||||
#endif // CONFIG_HAL_BOARD
|
||||
|
Loading…
Reference in New Issue
Block a user