beginTimerForIF

beginTimerForIF(delay:        Integer;
                option:       Integer;
                eventTag:     Integer;
                theInterface: JadeInterface);

The beginTimerForIF method of the Object class is a variation of the beginTimer method.

The beginTimerForIF method arms a timer on the receiver and registers the receiver for a timer notification.

When the specified timer delay (or period) expires, the system calls the timerEvent method mapped to the interface that registered the notification, rather than to that of the subscriber.

The object registering the notification (that is, the subscriber) must be an instance of a Class that includes a method that maps to the specified timerEvent method of the theInterface parameter value. The parameter specified in the method signatures must match the standard timerEvent method, as follows.

timerEvent(eventTag: Integer);

The parameters for the beginTimerForIF method are listed in the following table.

Parameter Description
delay Integer value (in milliseconds) for the timer delay
option TimerDurations category global constant Timer_Continuous (the timerEvent occurs continuously until it is disabled by the endTimerForIF method) or Timer_OneShot (the timerEvent occurs once only)
eventTag User-specified literal or constant that can be used to identify a specific timer event
theInterface The interface implemented by the subscriber

Use the getTimerStatusForIF method to return the status of the interface timer specified in the eventTag parameter.

The interface must have a defined timerEvent method and the receiver class must implement the corresponding method in the interface. (For details, see "Implementing an Interface", in Chapter 14 of the JADE Development Environment User’s Guide.)