1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Sleep while waiting for IPC events

This commit is contained in:
tux3 2015-06-29 11:39:19 +02:00
parent 3e8fe2db6c
commit 8d1a3b7357
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -189,6 +189,7 @@ bool IPC::waitUntilAccepted(time_t postTime, int32_t timeout/*=-1*/)
while (!(result = isEventAccepted(postTime))) while (!(result = isEventAccepted(postTime)))
{ {
qApp->processEvents(); qApp->processEvents();
QThread::sleep(10);
if (timeout > 0 && difftime(time(0), start) >= timeout) if (timeout > 0 && difftime(time(0), start) >= timeout)
break; break;
} }