1 \section{\class{wxTimer
}}\label{wxtimer
}
3 The wxTimer object is an abstraction of MS Windows and X toolkit timers. 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
}
14 \helpref{::wxStartTimer
}{wxstarttimer
},
\helpref{::wxGetElapsedTime
}{wxgetelapsedtime
}
16 \latexignore{\rtfignore{\wxheading{Members
}}}
18 \membersection{wxTimer::wxTimer
}
20 \func{}{wxTimer
}{\void}
24 \membersection{wxTimer::
\destruct{wxTimer
}}
26 \func{}{\destruct{wxTimer
}}{\void}
28 Destructor. Stops the timer if activated.
30 \membersection{wxTimer::Interval
}
32 \func{int
}{Interval
}{\void}
34 Returns the current interval for the timer.
36 \membersection{wxTimer::Notify
}
38 \func{void
}{Notify
}{\void}
40 This member should be overridden by the user. It is called on timeout.
42 \membersection{wxTimer::Start
}
44 \func{bool
}{Start
}{\param{int
}{ milliseconds = -
1},
\param{bool
}{ oneShot=FALSE
}}
46 (Re)starts the timer. If
{\it milliseconds
}\/ is absent or -
1, the
47 previous value is used. Returns FALSE if the timer could not be started,
48 TRUE otherwise (in MS Windows timers are a limited resource).
50 If
{\it oneShot
} is FALSE (the default), the Notify function will be repeatedly
51 called. If TRUE, Notify will be called only once.
53 \membersection{wxTimer::Stop
}
55 \func{void
}{Stop
}{\void}