Clock
General System Function
The Clock function is a system function that returns the elapsed simulation time. You can assign the Clock function to Variables or Attributes, or used in other types of Logic statements. Note that assigning the Clock function to a Variable or an Attribute requires a Real type setting.
Syntax
Clock({<time unit>})
Syntax Examples
If Clock(day) >= 1.5 Then Pause
Attr1 = Clock()
Parameters
{<time unit>}
Your preferred unit of time. If no time unit is specified, the Clock function defaults to ProModel's General Information setting.
Parameters Examples
You define the statement...
Var1 = Clock(min)
...in the Work Bench 2 Location Logic. The Variable Var1 is assigned the amount of elapsed minutes in the simulation when an Entity reaches the Work Bench 2.
The following code displays the amount of time that has elapsed in the simulation when an Entity enters the Truck Location.
Display Var1
Remarks
It is recommended that Clock units be kept consistent when comparing values. If an Attribute has been assigned a time in minutes, any time value compared with that Attribute should also be in minutes.