Runtime Behavior

At runtime, a state machine timeout timer starts when the state machine starts. The timer is cancelled when the state machine completes.

The state machine times out irrespective of its state at run-time when the state machine does not complete within the timeout period.

Similarly, a state timeout timer starts when the state machine enters the state. The timer is canceled when the state machine leaves the state, using any transition, including a self transition (in which the state machine exits and then re-enters the state).

The state times out when the state machine does not leave the state within the state timeout period.

Note: A timeout expression that evaluates to zero (For example: return 0;) means that the state model or state never times out.