#include "wx/private/timer.h"
#include "wx/utils.h" // for wxNewId()
+#include "wx/thread.h"
wxTimerImpl::wxTimerImpl(wxTimer *timer)
{
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)
// 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() )