]> git.saurik.com Git - wxWidgets.git/blob - src/qt/timer.cpp
Commented out palette code for wxGTK
[wxWidgets.git] / src / qt / timer.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: timer.cpp
3 // Purpose: wxTimer implementation
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "timer.h"
14 #endif
15
16 #include "wx/timer.h"
17
18 IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
19
20 wxTimer::wxTimer()
21 {
22 m_milli = 0 ;
23 m_lastMilli = -1 ;
24 m_id = 0;
25 m_oneShot = FALSE;
26 }
27
28 wxTimer::~wxTimer()
29 {
30 Stop();
31 }
32
33 bool wxTimer::Start(int milliseconds,bool mode)
34 {
35 m_oneShot = mode ;
36 if (m_milliseconds < 0)
37 m_milliseconds = lastMilli;
38
39 if (m_milliseconds <= 0)
40 return FALSE;
41
42 m_lastMilli = m_milli = m_milliseconds;
43
44 // TODO: set the timer going.
45 return FALSE;
46 }
47
48 void wxTimer::Stop()
49 {
50 m_id = 0 ;
51 m_milli = 0 ;
52 }
53
54