This routine will cause the program to pause in a machine efficient fashion.
Usage
CALL "C$SLEEP" USING NUM-SEC
Parameter
NUM-SEC Numeric parameter
The number of seconds to sleep.
This parameter is a USAGE DISPLAY unsigned integer or alphanumeric data item. If it is alphanumeric, it should contain a numeric value.
Description
This routine can be used to impose slight delays in loops. For example, you might want to introduce a delay in a loop that is waiting for a record to become unlocked. Calling C$SLEEP will allow the machine to execute other programs while you wait.
The C$SLEEP routine is passed one argument. This argument is the number of seconds you want to pause. For example, to pause the program for five seconds, you could use:
CALL "C$SLEEP" USING "5"
The amount of time paused is only approximate. Depending on the granularity of the system clock and the current load on the machine, the time paused may actually be shorter or longer than the time requested. Typically, the time paused will be within one second of the amount requested (unless the machine is excessively loaded).