TimeLeft
Preemption Logic System Function
The TimeLeft function returns the time remaining if the preemption occurred during a Wait statement. The value returned is in default time units and must be checked before any processing delay occurs since the value is updated whenever a preemption takes place. If the value is referred to later, it should be assigned to the Entity's Attribute or to a local Variable.
Syntax
TimeLeft()
Syntax Example
Attr1=TimeLeft()
Remarks
TimeLeft is valid in operation logic.
If several Entities are preempted at a Location, the value returned by the function to each Entity is taken from whichever Entity has the largest time remaining in the Wait statement.
When no units are specified in the parentheses in this function, it returns the default time unit specified in ProModel's General Information dialog.