logic: added sleep time of 25ms to messaging loop

This commit is contained in:
Eberhard Graether
2014-12-12 17:09:16 +01:00
parent 5f20344252
commit 67b8186658
3 changed files with 35 additions and 8 deletions
+4 -1
View File
@@ -240,6 +240,9 @@ private:
void waitForThread() const
{
static const int THREAD_WAIT_TIME_MS = 5;
std::this_thread::sleep_for(std::chrono::milliseconds(THREAD_WAIT_TIME_MS));
while (MessageQueue::getInstance()->hasMessagesQueued())
{
std::this_thread::sleep_for(std::chrono::milliseconds(THREAD_WAIT_TIME_MS));
}
}
};