function AddTimerTrigger : Word;
Adds a timer trigger.
If the trigger is added successfully the function returns the handle of the trigger; otherwise it generates an exception. The timer must be activated subsequently with a call to SetTimerTrigger.
The following example adds a timer trigger and enables it to expire in 2000 milliseconds (2 seconds), when it will generate an OnTriggerTimer event. Note that timer triggers are not self-restarting; the application's event handler must call SetTimerTrigger again once an event is handled.
var
Timer : Word;
...
Timer := ApxComPort.AddTimerTrigger;
ApxComPort.SetTimerTrigger(Timer, 2000, True);
See also: SetTimerTrigger