1 \section{\class{wxTimer
}}\label{wxtimer
}
3 The wxTimer class allows you to execute code at specified intervals. To
4 use it, derive a new class and override the
{\bf Notify
} member to
5 perform the required action. Start with
{\bf Start
}, stop with
{\bf
6 Stop
}, it's as simple as that.
8 \wxheading{Derived from
}
10 \helpref{wxObject
}{wxobject
}
12 \wxheading{Include files
}
18 \helpref{::wxStartTimer
}{wxstarttimer
},
\helpref{::wxGetElapsedTime
}{wxgetelapsedtime
},
\helpref{wxStopWatch
}{wxstopwatch
}
20 \latexignore{\rtfignore{\wxheading{Members
}}}
22 \membersection{wxTimer::wxTimer
}
24 \func{}{wxTimer
}{\void}
28 \membersection{wxTimer::
\destruct{wxTimer
}}
30 \func{}{\destruct{wxTimer
}}{\void}
32 Destructor. Stops the timer if activated.
34 \membersection{wxTimer::Interval
}
36 \func{int
}{Interval
}{\void}
38 Returns the current interval for the timer.
40 \membersection{wxTimer::Notify
}
42 \func{void
}{Notify
}{\void}
44 This member should be overridden by the user. It is called on timeout.
46 \membersection{wxTimer::Start
}
48 \func{bool
}{Start
}{\param{int
}{ milliseconds = -
1},
\param{bool
}{ oneShot=FALSE
}}
50 (Re)starts the timer. If
{\it milliseconds
}\/ is absent or -
1, the
51 previous value is used. Returns FALSE if the timer could not be started,
52 TRUE otherwise (in MS Windows timers are a limited resource).
54 If
{\it oneShot
} is FALSE (the default), the Notify function will be repeatedly
55 called. If TRUE, Notify will be called only once.
57 \membersection{wxTimer::Stop
}
59 \func{void
}{Stop
}{\void}
63 \section{\class{wxStopWatch
}}\label{wxstopwatch
}
65 The wxStopWatch class allow you to measure time intervalls.
67 \wxheading{Include files
}
73 \helpref{::wxStartTimer
}{wxstarttimer
},
\helpref{::wxGetElapsedTime
}{wxgetelapsedtime
},
\helpref{wxTimer
}{wxtimer
}
75 \latexignore{\rtfignore{\wxheading{Members
}}}
77 \membersection{wxStopWatch::wxStopWatch
}
79 \func{}{wxStopWatch
}{\void}
81 Constructor. This starts the stop watch.
83 \membersection{wxStopWatch::Pause
}\label{wxstopwatchpause
}
85 \func{void
}{Pause
}{\void}
87 Pauses the stop watch. Call
\helpref{wxStopWatch::Resume
}{wxstopwatchresume
} to resume
90 \membersection{wxStopWatch::Start
}
92 \func{void
}{Start
}{\param{long
}{ milliseconds =
0}}
94 (Re)starts the stop watch with a given initial value.
96 \membersection{wxStopWatch::Resume
}\label{wxstopwatchresume
}
98 \func{void
}{Resume
}{\void}
100 Resumes the stop watch after having been paused with
\helpref{wxStopWatch::Pause
}{wxstopwatchpause
}.
102 \membersection{wxStopWatch::Time
}
104 \func{long
}{Time
}{\void}\label{wxstopwatchtime
}
106 Returns the time in milliseconds since the start (or restart) or the last call of
107 \helpref{wxStopWatch::Pause
}{wxstopwatchpause
}.