timeof
The
timeof keyword accesses an event timestamp.
Purpose
This keyword is used to access an event timestamp.
Context
Functions or rule actions
Syntax
timeof (?eventVar) ?time
Description
Deprecated as of V7.5.
The
value of the timeof operator applied to an event
is the event timestamp returned as a long number.
The variable ?time is synonymous with timeof(?this).
Example
The following rule prints a timestamp
each time an Alarm object is inserted in the working
memory.
rule TraceAlarms {
when {
?a: event Alarm();
} then {
System.out.println(timeof(?a));
}
};