]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/timer.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxTimer class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "timer.h"
19 #include "wx/object.h"
21 class WXDLLEXPORT wxTimer
: public wxObject
23 friend void wxProcessTimer(wxTimer
& timer
);
29 virtual bool Start(int milliseconds
= -1,
30 bool one_shot
= FALSE
); // Start timer
31 virtual void Stop(); // Stop timer
33 virtual void Notify() = 0; // Override this member
35 // Returns the current interval time (0 if stop)
36 int Interval() const { return milli
; };
37 bool OneShot() const { return oneShot
; }
47 DECLARE_ABSTRACT_CLASS(wxTimer
)
50 // Timer functions (milliseconds)
51 void WXDLLEXPORT
wxStartTimer();
52 // Gets time since last wxStartTimer or wxGetElapsedTime
53 long WXDLLEXPORT
wxGetElapsedTime(bool resetTimer
= TRUE
);
55 // EXPERIMENTAL: comment this out if it doesn't compile.
56 bool WXDLLEXPORT
wxGetLocalTime(long *timeZone
, int *dstObserved
);
58 // Get number of seconds since 00:00:00 GMT, Jan 1st 1970.
59 long WXDLLEXPORT
wxGetCurrentTime();