$ZTIMEOUT controls a single process wide timer. The format of the $ZTIMEOUT ISV is:
$ZTIMeout=([timeout][:labelref])
![]() | Warning |
---|---|
When none of the vectors are specified, a $ZTIMEOUT expiration results in the termination of the process Using a [Z}GOTO that stays within a $ZTIMEOUT labelref vector frame may cause undefined and undesirable behavior |
GTM>zprint ^ztimeout ztimeout ; Display $ztimeout write !,$ztimeout ; display $ZTIMeout - in this case the initial value -1 ; set with a vector (do ^TIMEOUT) set $ztimeout="60:do ^TIMEOUT" ; timeout of 1 minute. After timeout expires, XECUTEs do ^TIMEOUT write !,$ztimeout ; displays the remaining time:vector until timeout ; set without a vector set $ztimeout=120 ; set the timeout to 2 minutes without changing the vector set $ztimeout="1234do ^TIMEOUT" ; missing colon creates a timeout for 1234 seconds set $ztimeout="10:" ; set the timeout to 10 seconds and vector to current etrap or ztrap set $ztimeout=-1 ; set cancels the timeout ; Note that set to 0 triggers an immediate timeout set $ztimeout=0 ; triggers the current vector set $ztimeout="0:DO FOO" ; this has the same effect as DO FOO GTM>