Guardian Procedure Calls Reference Manual
DELAY Procedure (Superseded by PROCESS_DELAY_ Procedure)
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameter
Considerations
Example
Summary
The DELAY procedure permits a process to suspend itself for a timed interval.
Syntax for C Programmers
#include <cextdecs(DELAY)>
void DELAY ( __int32_t time-period );
• CEXTDECS (through the included file TNSINTH) defines 32-bit values as the typedef
__int32_t, which for TNS and TNS/R compiles is defined as long and for TNS/E compiles
is defined as int.
Syntax for TAL Programmers
CALL DELAY ( time-period ); ! i
Parameter
time-period
input
INT(32):value
specifies the time period, in 0.01-second units, for which the caller of DELAY is to be suspended.
Considerations
• time-period value <= 0D
A value of less than or equal to 0D results in no delay as such but returns this process' process
control block (PCB) to the ready list to give other processes of the same priority a chance to
execute.
• Measuring time by the processor clock
The DELAY procedure measures time according to the internal clock of the processor in which
the calling process is executing. Typically, processor time (that is, time as measured by a
particular processor) is slightly different from system time; it also varies slightly from processor
to processor, because all the processor clocks typically run at slightly different speeds. System
time is determined by taking the average of all the processor times in the system.
When measuring short intervals of time, the difference between processor time and system
time is negligible. However, when measuring long intervals of time (such as several hours or
more), the difference can be noticeable. For a discussion about measuring long time intervals,
see the SIGNALTIMEOUT procedure Considerations (page 1381).
296 Guardian Procedure Calls (D-E)