Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (S)
Guardian Procedure Calls Reference Manual—522629-013
14-64
SETLOOPTIMER Procedure
If the value of new-time-limit is 0, process loop timing is disabled.
old-time-limit output
INT:ref:1
returns the current setting of the process’s loop timer (in 0.01-second units).
Condition Code Settings
< (CCL) indicates that the new-time-limit parameter is omitted or is specified
as a negative value. The state of process loop timing and the setting of the
process’s loop timer are unchanged.
= (CCE) indicates that the
new-time-limit value is set into the process’s loop
timer and that loop timing is enabled.
> (CCG) is not returned from SETLOOPTIMER.
Considerations
•
Process processor time
Using SETLOOPTIMER to measure process processor time is not recommended.
Use the MYPROCESSTIME procedure for this purpose.
•
Timed asynchronous interrupts
SETLOOPTIMER is not practical for generating timed asynchronous interrupts for
most users.
•
Process loop timeout in system code
If a process loop-timer expires in protected code, the trap (for a Guardian TNS
process) or signal (for an OSS process or native process) is delayed until control
enters unprotected code.
•
Detection of process looping
To detect whether it is looping, a process can call SETLOOPTIMER (resetting the
time limit) at a given point each time through its main execution loop. If the
process fails to finish executing its main loop, SETLOOPTIMER is not called and
the time limit is not reset. Consequently, the time limit is reached, and a trap or
signal occurs. (When the trap handler or signal handler completes execution, the
process resumes its normal instruction path.)