- make client use less CPU for network games

This commit is contained in:
Mark Vejvoda 2013-03-10 16:19:04 +00:00
parent d041f1eea6
commit 21d38b6231
1 changed files with 7 additions and 1 deletions

View File

@ -106,13 +106,19 @@ void ClientInterfaceThread::execute() {
ExecutingTaskSafeWrapper safeExecutingTaskMutex(this);
//Chrono chrono;
//if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
//printf("START === Client thread ended\n");
Chrono chrono(true);
while(this->getQuitStatus() == false && clientInterface != NULL) {
clientInterface->updateNetworkFrame();
if(chrono.getMillis() >= 200) {
sleep(5);
chrono.start();
}
}
//printf("END === Client thread ended\n");