Timer
From Pointui
A simple timer.
NOTE: this timer will trigger the OnTimer() event even if the user is on another screen. You should be very careful about limiting the amount of work done within an OnTimer() handler, and in fact it’s usually a good idea to switch these timers off when the user navigates away from your Applet or Screen, and switch them back on when the Applet or Screen is reactivated. Otherwise, if the timer remains on, the handler should only set a flag indicating that further updating is required when the Applet or Screen is next shown. This requires using the Activated() and Deactivated() methods of the Applet or Screen.
Contents |
Events
void OnTimer()
Triggered each time the timer interval is hit.
EXAMPLE
Timer bgTimer; void Load() { //provide a handler for OnTimer event bgTimer.OnTimer = bgTimer_OnTimer; //have the timer trigger every 5 seconds bgTimer.StartSecondsTimer(5); } void bgTimer_OnTimer() { //change the background image }
Methods
void StartMinuteTimer(int intervalMinutes)
Starts a timer that will trigger every intervalMinutes minutes.
void StartSecondsTimer(int intervalSeconds)
Starts a timer that will trigger every intervalSeconds seconds.
void StartMillisecondsTimer(int intervalMilliseconds)
Starts a timer that will trigger every intervalMilliseconds 1/1000th of a second.
void Stop()
Stops the timer.
