- oneShot = mode ;
- if (milliseconds < 0)
- milliseconds = lastMilli;
-
- if (milliseconds <= 0)
- return FALSE;
-
- lastMilli = milli = milliseconds;
-
- wxTimerList.DeleteObject(this);
- TIMERPROC wxTimerProcInst = (TIMERPROC) MakeProcInstance((FARPROC)wxTimerProc,
- wxGetInstance());
-
- id = SetTimer(NULL, (UINT)(id ? id : 1), (UINT)milliseconds, wxTimerProcInst);
- if (id > 0)
- {
- wxTimerList.Append(id, this);
- return TRUE;
- }
- else return FALSE;
+ if ( m_id )
+ {
+ ::KillTimer(NULL, (UINT)m_id);
+
+ wxTimerList.DeleteObject(this);
+ }
+
+ m_id = 0;