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:
parent
3e8fe2db6c
commit
8d1a3b7357
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user