Merge branch 'cpu-usage'
This commit is contained in:
@@ -649,6 +649,7 @@ public:
|
|||||||
std::this_thread::sleep_for((next_frame - now) / 3 * 2);
|
std::this_thread::sleep_for((next_frame - now) / 3 * 2);
|
||||||
}
|
}
|
||||||
while(next_frame > now) {
|
while(next_frame > now) {
|
||||||
|
std::this_thread::sleep_for(1ns);
|
||||||
now = std::chrono::steady_clock::now();
|
now = std::chrono::steady_clock::now();
|
||||||
}
|
}
|
||||||
next_frame = now + delay;
|
next_frame = now + delay;
|
||||||
@@ -769,6 +770,7 @@ public:
|
|||||||
std::this_thread::sleep_for((next_frame - now) / 3 * 2);
|
std::this_thread::sleep_for((next_frame - now) / 3 * 2);
|
||||||
}
|
}
|
||||||
while(next_frame > now) {
|
while(next_frame > now) {
|
||||||
|
std::this_thread::sleep_for(1ns);
|
||||||
now = std::chrono::steady_clock::now();
|
now = std::chrono::steady_clock::now();
|
||||||
}
|
}
|
||||||
next_frame = now + delay;
|
next_frame = now + delay;
|
||||||
|
|||||||
@@ -763,7 +763,7 @@ void controlBroadcastThread(control_server_t *server) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
server->iterate(50ms);
|
server->iterate(150ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let all remaining connections know the server is shutting down
|
// Let all remaining connections know the server is shutting down
|
||||||
|
|||||||
Reference in New Issue
Block a user