1998-05-20 14:25:30 +00:00
|
|
|
\section{\class{wxTimer}}\label{wxtimer}
|
|
|
|
|
1999-02-15 20:41:29 +00:00
|
|
|
The wxTimer class allows you to execute code at specified intervals. To
|
1998-05-20 14:25:30 +00:00
|
|
|
use it, derive a new class and override the {\bf Notify} member to
|
|
|
|
perform the required action. Start with {\bf Start}, stop with {\bf
|
|
|
|
Stop}, it's as simple as that.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 20:41:29 +00:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/timer.h>
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\wxheading{See also}
|
|
|
|
|
1999-12-04 13:28:26 +00:00
|
|
|
\helpref{::wxStartTimer}{wxstarttimer}, \helpref{::wxGetElapsedTime}{wxgetelapsedtime}, \helpref{wxStopWatch}{wxstopwatch}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxTimer::wxTimer}
|
|
|
|
|
|
|
|
\func{}{wxTimer}{\void}
|
|
|
|
|
|
|
|
Constructor.
|
|
|
|
|
|
|
|
\membersection{wxTimer::\destruct{wxTimer}}
|
|
|
|
|
|
|
|
\func{}{\destruct{wxTimer}}{\void}
|
|
|
|
|
|
|
|
Destructor. Stops the timer if activated.
|
|
|
|
|
|
|
|
\membersection{wxTimer::Interval}
|
|
|
|
|
|
|
|
\func{int}{Interval}{\void}
|
|
|
|
|
|
|
|
Returns the current interval for the timer.
|
|
|
|
|
|
|
|
\membersection{wxTimer::Notify}
|
|
|
|
|
|
|
|
\func{void}{Notify}{\void}
|
|
|
|
|
|
|
|
This member should be overridden by the user. It is called on timeout.
|
|
|
|
|
|
|
|
\membersection{wxTimer::Start}
|
|
|
|
|
|
|
|
\func{bool}{Start}{\param{int}{ milliseconds = -1}, \param{bool}{ oneShot=FALSE}}
|
|
|
|
|
|
|
|
(Re)starts the timer. If {\it 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 {\it oneShot} is FALSE (the default), the Notify function will be repeatedly
|
|
|
|
called. If TRUE, Notify will be called only once.
|
|
|
|
|
|
|
|
\membersection{wxTimer::Stop}
|
|
|
|
|
|
|
|
\func{void}{Stop}{\void}
|
|
|
|
|
|
|
|
Stops the timer.
|
|
|
|
|
1999-12-04 13:28:26 +00:00
|
|
|
\section{\class{wxStopWatch}}\label{wxstopwatch}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
1999-12-04 13:28:26 +00:00
|
|
|
The wxStopWatch class allow you to measure time intervalls.
|
|
|
|
|
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/timer.h>
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{::wxStartTimer}{wxstarttimer}, \helpref{::wxGetElapsedTime}{wxgetelapsedtime}, \helpref{wxTimer}{wxtimer}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxStopWatch::wxStopWatch}
|
|
|
|
|
|
|
|
\func{}{wxStopWatch}{\void}
|
|
|
|
|
|
|
|
Constructor. This starts the stop watch.
|
|
|
|
|
|
|
|
\membersection{wxStopWatch::Pause}\label{wxstopwatchpause}
|
|
|
|
|
|
|
|
\func{void}{Pause}{\void}
|
|
|
|
|
|
|
|
Pauses the stop watch. Call \helpref{wxStopWatch::Resume}{wxstopwatchresume} to resume
|
|
|
|
time measuring again.
|
|
|
|
|
|
|
|
\membersection{wxStopWatch::Start}
|
|
|
|
|
|
|
|
\func{void}{Start}{\param{long}{ milliseconds = 0}}
|
|
|
|
|
|
|
|
(Re)starts the stop watch with a given initial value.
|
|
|
|
|
|
|
|
\membersection{wxStopWatch::Resume}\label{wxstopwatchresume}
|
|
|
|
|
|
|
|
\func{void}{Resume}{\void}
|
|
|
|
|
|
|
|
Resumes the stop watch after having been paused with \helpref{wxStopWatch::Pause}{wxstopwatchpause}.
|
|
|
|
|
|
|
|
\membersection{wxStopWatch::Time}
|
|
|
|
|
|
|
|
\func{long}{Time}{\void}\label{wxstopwatchtime}
|
|
|
|
|
|
|
|
Returns the time in milliseconds since the start (or restart) or the last call of
|
|
|
|
\helpref{wxStopWatch::Pause}{wxstopwatchpause}.
|