Simulation allows you to evaluate duration constraints between Call Messages and Reply Messages, e.g., you can specify that a Call Message must get a Reply Message in 500 ms, so the actual duration of operation method execution must be compared with the duration constraint of 500 ms. The comparison is done as an evaluation of the constraint and will generate a fail value for testcases or stop at breakpoints on the Constraint Failure As Breakpoint option. However, it does not support the delay time of a message.

The default time unit of the duration constraint is millisecond (ms), but you can also use other time units by specifying them after the duration value, e.g., you can use 10s to denote 10 seconds. If you specify both the minimum and maximum values, Simulation will use the maximum value of the duration constraint to delay the delivery of a Message.

A Sequence diagram showing how a Duration Constraint {500} can be used to evaluate between the Call Message and Reply Message.

The figure above shows that cons sends a Call Message to bank to verify an account (12345678) with an expected duration constraint of 500 ms from the Reply Message. The evaluation in the first run is failed because the actual duration (431 ms) is less than 500 ms, while another run passes because the actual duration (710 ms) is greater than 500 ms.