Clauses for Explicit Temporal Constructs

The pattern grammar implicitly describes a sequence of events: there is an implicit time component in each pattern. In addition three constructs enforce explicit time-based restrictions on a sequence: within, during, and after. You can use these constructs to enforce stricter time-based constraints on a sequence:

Within

The within construct ensures that all the events described inside the within clause occur within the time span specified. The timer starts as soon as the event preceding this sub-pattern arrives.

As soon as all the events in the sub-pattern occur in the correct sequence, the pattern instance moves to the next step after the within clause.

During

Like within, the during construct ensures that all the events described inside the during clause occur within the time span specified. The timer starts as soon as the event preceding this sub-pattern arrives.

The pattern remains in the during sub-pattern until the timer has expired, even if all the events in the sub-pattern occur in the correct sequence before that time. (This behavior is the difference between occurs within and occurs during.)

After

The after construct simply specifies a time period to wait before accepting the next event. It does not accept any event or sub-pattern. The timer starts as soon as the event preceding this sub-pattern arrives.

Use this construct to model event sequences where there is no activity for certain fixed periods of time.