]> git.saurik.com Git - wxWidgets.git/blob - include/wx/timer.h
Fixes to Cygwin/Mingw32 makefile, manual now compiles wxStaticLine, etc.
[wxWidgets.git] / include / wx / timer.h
1 #ifndef _WX_TIMER_H_BASE_
2 #define _WX_TIMER_H_BASE_
3
4 #if defined(__WXMSW__)
5 #include "wx/msw/timer.h"
6 #elif defined(__WXMOTIF__)
7 #include "wx/motif/timer.h"
8 #elif defined(__WXGTK__)
9 #include "wx/gtk/timer.h"
10 #elif defined(__WXQT__)
11 #include "wx/qt/timer.h"
12 #elif defined(__WXMAC__)
13 #include "wx/mac/timer.h"
14 #elif defined(__WXPM__)
15 #include "wx/os2/timer.h"
16 #elif defined(__WXSTUBS__)
17 #include "wx/stubs/timer.h"
18 #endif
19
20 class WXDLLEXPORT wxChrono
21 {
22 public:
23 wxChrono();
24
25 void Start(long t=0);
26 void Pause();
27 void Resume();
28
29 long Time();
30
31 private:
32 long m_t0;
33 long m_pause;
34 };
35
36 // Timer functions (milliseconds)
37 void WXDLLEXPORT wxStartTimer();
38
39 // Gets time since last wxStartTimer or wxGetElapsedTime
40 long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE);
41
42 // EXPERIMENTAL: comment this out if it doesn't compile.
43 bool WXDLLEXPORT wxGetLocalTime(long *timeZone, int *dstObserved);
44
45 // Get number of seconds since 00:00:00 GMT, Jan 1st 1970.
46 long WXDLLEXPORT wxGetCurrentTime();
47
48 // Get number of milliseconds since 00:00:00 GMT, Jan 1st 1970.
49 long WXDLLEXPORT wxGetCurrentMTime();
50
51 #endif
52 // _WX_TIMER_H_BASE_