The timer object provides a means for setting an alarm in the application. Use it to execute a set of logic on a periodic basis.
Although the function associated with the timer is normally
executed at the end of the interval set in the timer, there is an
exception. If, at the end of this interval, some other process (such
as a loop) is being run from within the AIM, the execution of the
function associated with the timer will not occur until that other
process has terminated. This is because the timer was designed to
not allow its associated function to interrupt another process.
Defining a timer object
Select Timer from the Classes list and click Add. The Timer window appears.
Click in the name Field and type the reference name for the timer object.
Click in the ID field and type an object ID value, which must fall in the range of 1 - 32767.
Click in the Interval field and type the number of milliseconds the timer should wait before performing the function identified in the Function drop-down list.
This is an initial value. This number is replaced by any value greater than 0 in the timer::set() method that makes the timer active.
Either click the Function drop-down list and select the name of the function the timer should initiate whenever it counts up to the time specified in the Interval box or click Details.
Choose one of the following:
Click the One Shot check box to have the timer count up to the interval, perform the function, and stop. It never repeats the action unless you reset it with the timer::set() method.
Do not click the One Shot check box to have the timer count up to the interval, performs the function, reset its counter, and restart the process. The only way to stop the timer action is to issue the kill() method from some other activity in your program
Click OK to complete your entries or modifications and build the timer.
See the e-Biz Impact ODL Guide for
more information about the kill() and set() methods.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |