The wxTimer class allows you to execute code at specified intervals. To use it, derive a new class and override the Notify member to perform the required action. Start with Start, stop with Stop, it's as simple as that.
Derived from
Include files
<wx/timer.h>
See also
::wxStartTimer, ::wxGetElapsedTime
Members
wxTimer::wxTimer
wxTimer::~wxTimer
wxTimer::Interval
wxTimer::Notify
wxTimer::Start
wxTimer::Stop
wxTimer()
Constructor.
~wxTimer()
Destructor. Stops the timer if activated.
int Interval()
Returns the current interval for the timer.
void Notify()
This member should be overridden by the user. It is called on timeout.
bool Start(int milliseconds = -1, bool oneShot=FALSE)
(Re)starts the timer. If milliseconds is absent or -1, the previous value is used. Returns FALSE if the timer could not be started, TRUE otherwise (in MS Windows timers are a limited resource).
If oneShot is FALSE (the default), the Notify function will be repeatedly called. If TRUE, Notify will be called only once.
void Stop()
Stops the timer.