- // Check to see if it's still on
- if (!wxTimerList.Find((long)timer))
- 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();
+ // Check to see if it's still on
+ if ( gs_timers.find(timer) == gs_timers.end() )
+ return;
+
+ if ( !timer->IsRunning() )
+ return; // Avoid to process spurious timer events
+
+ timer->Notify();