Apama Documentation : Developing Apama Applications : Developing Apama Applications in EPL : Defining Event Listeners : Understanding time in the correlator : Disabling the correlator's internal clock : About repeating timers and &TIME events
About repeating timers and &TIME events
You are not required to send &TIME events every tenth of a second. You can send them at larger intervals and timers will behave as they would when the correlator generates clock ticks. For a repeating timer, a single &TIME event can make it fire multiple times. Consequently, sending an &TIME event can have a lot of overhead if it is a large time jump and there are repeating timers. For example, consider the following pattern:
1. You start the correlator and specify the -Xclock option, which sets the time to 0.
2. You inject a timer into the correlator, for example, on all wait(0.1).
3. You send an &TIME event to the correlator and this event has a relatively large value, for example, 1185898806.
The result of this pattern is that the timer fires many times because the &TIME event causes each intermediate, repeating timer to fire. (Intermediate timers are timers that are set to fire between the last-received time and the next-received time.) For the example given, the timer fires 1010 times, which can take a while to process. You can avoid this problem by doing any one of the following:
*Send the correlator an &TIME event and specify a sensible time before you set up any timers. This is likely to be your best alternative.
*Send the correlator an &TIME event and specify a sensible time before you inject any monitors.
*Send the correlator an &SETTIME event before you send the &TIME event. See Setting the time in the correlator (&SETTIME event).
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback