Rate limit Settings::background_monitor.

This commit is contained in:
redpolline 2024-12-22 00:37:00 -05:00
parent c81c506b97
commit bfb56db87d

View file

@ -377,6 +377,8 @@ void Settings::background_monitor_entry(Settings * settings) {
return; return;
} }
#define BACKGROUND_MONITOR_RATE 200
void Settings::background_monitor() { void Settings::background_monitor() {
bool exit = false; bool exit = false;
do { do {
@ -418,6 +420,7 @@ void Settings::background_monitor() {
} }
} }
} }
std::this_thread::sleep_for(std::chrono::milliseconds(BACKGROUND_MONITOR_RATE));
} }
} }
} while(!exit); } while(!exit);