+#include "wx/motif/private.h"
+
+IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxEvtHandler);
+
+WX_DECLARE_VOIDPTR_HASH_MAP(wxTimer*, wxTimerHashMap);
+
+static wxTimerHashMap s_timers;
+
+void wxTimerCallback (wxTimer * timer)
+{
+ // Check to see if it's still on
+ if (s_timers.find(timer) == s_timers.end())
+ return;
+
+ if (timer->m_id == 0)
+ return; // Avoid to process spurious timer events
+
+ if (!timer->m_oneShot)
+ timer->m_id = XtAppAddTimeOut((XtAppContext) wxTheApp->GetAppContext(),
+ timer->m_milli,
+ (XtTimerCallbackProc) wxTimerCallback,
+ (XtPointer) timer);
+ else
+ timer->m_id = 0;
+
+ timer->Notify();
+}
+
+void wxTimer::Init()