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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user