don't sleep too long to avoid missing the timers; added a simple test for timer events processing in console apps

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-10-27 22:04:42 +00:00
parent fadc2df682
commit 438febca6e
8 changed files with 170 additions and 12 deletions

View File

@@ -148,18 +148,6 @@ bool wxConsoleEventLoop::Pending() const
}
bool wxConsoleEventLoop::Dispatch()
{
m_dispatcher->Dispatch();
wxTheApp->ProcessPendingEvents();
return true;
}
void wxConsoleEventLoop::WakeUp()
{
m_wakeupPipe.WakeUp();
}
void wxConsoleEventLoop::OnNextIteration()
{
// calculate the timeout until the next timer expiration
int timeout;
@@ -183,6 +171,17 @@ void wxConsoleEventLoop::OnNextIteration()
wxTimerScheduler::Get().NotifyExpired();
#endif
wxTheApp->ProcessPendingEvents();
return true;
}
void wxConsoleEventLoop::WakeUp()
{
m_wakeupPipe.WakeUp();
}
void wxConsoleEventLoop::OnNextIteration()
{
// call the signal handlers for any signals we caught recently
wxTheApp->CheckSignal();
}