]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/stubs/timer.h
2e0e85010f9472bef591ec2261c48bb811ae012d
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxTimer class
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "timer.h"
19 #include "wx/object.h"
21 class WXDLLEXPORT wxTimer
: public wxObject
27 virtual bool Start(int milliseconds
= -1,
28 bool one_shot
= FALSE
); // Start timer
29 virtual void Stop(); // Stop timer
31 virtual void Notify() = 0; // Override this member
33 // Returns the current interval time (0 if stop)
34 int Interval() const { return milli
; };
35 bool OneShot() const { return oneShot
; }
45 DECLARE_ABSTRACT_CLASS(wxTimer
)
48 /* Note: these are implemented in common/timercmn.cpp, so need to implement them separately.
49 * But you may need to modify timercmn.cpp.
52 // Timer functions (milliseconds)
53 void WXDLLEXPORT
wxStartTimer();
54 // Gets time since last wxStartTimer or wxGetElapsedTime
55 long WXDLLEXPORT
wxGetElapsedTime(bool resetTimer
= TRUE
);
57 // EXPERIMENTAL: comment this out if it doesn't compile.
58 bool WXDLLEXPORT
wxGetLocalTime(long *timeZone
, int *dstObserved
);
60 // Get number of seconds since 00:00:00 GMT, Jan 1st 1970.
61 long WXDLLEXPORT
wxGetCurrentTime();