]> git.saurik.com Git - wxWidgets.git/blob - include/wx/qt/timer.h
1) minor modifications in fileconf.cpp
[wxWidgets.git] / include / wx / qt / timer.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: timer.h
3 // Purpose: wxTimer class
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_TIMER_H_
13 #define _WX_TIMER_H_
14
15 #ifdef __GNUG__
16 #pragma interface "timer.h"
17 #endif
18
19 #include "wx/object.h"
20
21 class WXDLLEXPORT wxTimer: public wxObject
22 {
23 DECLARE_DYNAMIC_CLASS(wxTimer)
24
25 public:
26 wxTimer();
27 ~wxTimer();
28 virtual bool Start(int milliseconds = -1,bool one_shot = FALSE); // Start timer
29 virtual void Stop(); // Stop timer
30 virtual void Notify() = 0; // Override this member
31 inline int Interval() { return m_milli ; }; // Returns the current interval time (0 if stop)
32
33 protected:
34 bool m_oneShot ;
35 int m_milli ;
36 int m_lastMilli ;
37 long m_id;
38
39 };
40
41 /* Note: these are implemented in common/timercmn.cpp, so need to implement them separately.
42 * But you may need to modify timercmn.cpp.
43 */
44
45 // Timer functions (milliseconds)
46 void WXDLLEXPORT wxStartTimer();
47 // Gets time since last wxStartTimer or wxGetElapsedTime
48 long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE);
49
50 // EXPERIMENTAL: comment this out if it doesn't compile.
51 bool WXDLLEXPORT wxGetLocalTime(long *timeZone, int *dstObserved);
52
53 // Get number of seconds since 00:00:00 GMT, Jan 1st 1970.
54 long WXDLLEXPORT wxGetCurrentTime();
55
56 #endif
57 // _WX_TIMER_H_