X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2ca375c5620209d77a88d2d378bdcdedbc82e7e..afab8b85c4bdeb11a248c57d13e9bcfa14149ef8:/src/common/timerimpl.cpp diff --git a/src/common/timerimpl.cpp b/src/common/timerimpl.cpp index d952af816f..d4d800d472 100644 --- a/src/common/timerimpl.cpp +++ b/src/common/timerimpl.cpp @@ -1,10 +1,9 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: common/timercmn.cpp +// Name: src/common/timerimpl.cpp // Purpose: wxTimerBase implementation // Author: Julian Smart, Guillermo Rodriguez, Vadim Zeitlin // Modified by: VZ: extracted all non-wxTimer stuff in stopwatch.cpp (20.06.03) // Created: 04/01/98 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // (c) 1999 Guillermo Rodriguez // Licence: wxWindows licence @@ -29,6 +28,7 @@ #include "wx/private/timer.h" #include "wx/utils.h" // for wxNewId() +#include "wx/thread.h" wxTimerImpl::wxTimerImpl(wxTimer *timer) { @@ -47,9 +47,8 @@ void wxTimerImpl::SetOwner(wxEvtHandler *owner, int timerid) void wxTimerImpl::SendEvent() { - wxTimerEvent event(m_idTimer, m_milli); - event.SetEventObject(m_owner); - (void)m_owner->ProcessEvent(event); + wxTimerEvent event(*m_timer); + (void)m_owner->SafelyProcessEvent(event); } bool wxTimerImpl::Start(int milliseconds, bool oneShot) @@ -58,7 +57,7 @@ bool wxTimerImpl::Start(int milliseconds, bool oneShot) // let the caller know about it #if wxUSE_THREADS wxASSERT_MSG( wxThread::IsMain(), - _T("timer can only be started from the main thread") ); + wxT("timer can only be started from the main thread") ); #endif // wxUSE_THREADS if ( IsRunning() )