make sleep shorter in poll/sleep getEvent() loops.

This commit is contained in:
crs 2002-06-02 21:35:20 +00:00
parent a541ebc557
commit 1e988b3839
2 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ void CMSWindowsScreen::getEvent(MSG* msg) const
{ {
// wait for an event in a cancellable way // wait for an event in a cancellable way
while (HIWORD(GetQueueStatus(QS_ALLINPUT)) == 0) { while (HIWORD(GetQueueStatus(QS_ALLINPUT)) == 0) {
CThread::sleep(0.05); CThread::sleep(0.01);
} }
GetMessage(msg, NULL, 0, 0); GetMessage(msg, NULL, 0, 0);
} }

View File

@ -141,7 +141,7 @@ bool CXWindowsScreen::getEvent(XEvent* xevent) const
for (;;) { for (;;) {
while (!m_stop && XPending(m_display) == 0) { while (!m_stop && XPending(m_display) == 0) {
m_mutex.unlock(); m_mutex.unlock();
CThread::sleep(0.05); CThread::sleep(0.01);
m_mutex.lock(); m_mutex.lock();
} }
if (m_stop) { if (m_stop) {