Increase RemoteDebuggerPeerTCP poll to 6.9ms

Fix high CPU usage on MacOS by reverting the polling for Network
debugging to match 144hz refresh rate.
This commit is contained in:
Will Whitty 2022-02-01 21:53:32 +03:00
parent ea12094f19
commit c37bd41c79
1 changed files with 2 additions and 1 deletions

View File

@ -190,7 +190,8 @@ Error RemoteDebuggerPeerTCP::connect_to_host(const String &p_host, uint16_t p_po
}
void RemoteDebuggerPeerTCP::_thread_func(void *p_ud) {
const uint64_t min_tick = 100;
// Update in time for 144hz monitors
const uint64_t min_tick = 6900;
RemoteDebuggerPeerTCP *peer = (RemoteDebuggerPeerTCP *)p_ud;
while (peer->running && peer->is_peer_connected()) {
uint64_t ticks_usec = OS::get_singleton()->get_ticks_usec();