Guardian Procedure Calls Reference Manual

When the timer expires (that is, when a timeout message is delivered to $RECEIVE), your
application can compute the remaining time and set another timer for the short interval that
remains.
However, because the possibility of clock discrepancy becomes greater as the interval being
timed becomes longer, it would be even safer to measure a long time interval by dividing it
into a series of relatively short intervals. One method is to compute the interval between the
current time and the desired time and set a timer to expire after half that interval. When the
timer expires, compute the remaining time and set another timer to expire after half that interval,
and so on, approaching the desired time by progressively smaller steps.
OSS Considerations
OSS processes can use this procedure and generate a system message. An OSS signal is not
generated.
Messages
Timeout message
When a time-list element (TLE) set by a call to SIGNALTIMEOUT times out, a system message
-22 (elapsed time timeout) is sent to the caller's $RECEIVE.
NOTE: Because a process must read $RECEIVE to be notified when a timer expires, there
can be a significant amount of delay before seeing the notification. For example, if a process
is waiting for an I/O operation to finish, or if a process has low priority and is waiting to
execute, a significant amount of time might pass before the process can read $RECEIVE.
SIGNALTIMEOUT should not be used in situations where such delays cannot be tolerated.
Example
CALL SIGNALTIMEOUT( 1000D , , , TIMERTAG ); ! 10 seconds.
Related Programming Manual
For programming information about the SIGNALTIMEOUT procedure, see the Guardian
Programmer's Guide.
1382 Guardian Procedure Calls (S)