Developing Apama Applications > EPL Reference > Events and Event Listeners > Event expressions > Timers
Timers
Specify a timer with the wait, at, or within keyword. For more detailed information, see Defining event listeners with temporal constraints.
The wait event operator
The wait operator can be used to limit the amount of time that an event listener can match an event. The wait operator’s expression specifies the time in seconds. The result of evaluating the wait expression must be of type float.
See also Waiting within an event listener.
The at event operator
The at operator allows triggering of an event listener at a specific time or repeatedly at multiple times, depending on how the series of expressions that follow the at operator are constructed.
The time specification of the at operator consists of either five or six expressions, corresponding to the number of minutes of the hour (0 to 59), hour of the day (0 to 23), day of the month (1 to 31), month of the year (1 to 12), day of the week (0 to 6, 0=Sunday), and seconds respectively.
If the optional number of seconds is omitted, 0 is used.
The * operator means that all times (minute, hour, etc.) for the corresponding part of the time specification will match.
You can specify one or more time values separated by commas.
See also Triggering event listeners at specific times.
The within operator
The within operator takes one operand, which is an expression of type float, whose value is the number of elapsed seconds from an event primary’s activation time that the event primary can be matched. The within operator’s result type is boolean. If the event is matched before the specified time has elapsed, the within operator’s result is true. When the time has elapsed and the event has not been matched, the within operator’s result is false.
See also Listening for event patterns within a set time.
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.