The Pause function waits for a specified amount of time. It should be used in place of timing loops to wait for an event to occur. A Pause function can be ended by a host event if a prior Start Host Notification (23) function has been called and the IPAUSE option is selected.
Prerequisite Calls
There are no prerequisite calls for this function.
Call Parameters
|
Standard Interface
|
Enhanced Interface
|
Function Number
|
Must be 18
|
|
Data String
|
NA
|
|
Length
|
Contains the pause duration in half-second increments
|
|
PS Position
|
NA
|
|
Return Parameters
Return Code
|
Definition
|
0
|
The wait duration has expired.
|
9
|
An internal system error was encountered. The time results are unpredictable.
|
26
|
The host session presentation space or OIA has been updated. Use the Query Host Update (24) function to get more information.
|
Remarks
1. | Selecting the FPAUSE or IPAUSE option using the Set Session Parameters (9) function affects the length of the pause you get when you call this function. |
2. | The value entered in the calling length parameter is the maximum number of half-second intervals that the Pause function waits. For a pause of 20 seconds, a hex value of 0028 (decimal 40) must be passed in the calling length parameter. |
3. | If you use the IPAUSE option and the pause value is zero, then the function waits up to 2400 half-second intervals, unless interrupted sooner. If you use the FPAUSE option and the pause value is zero, then the function returns immediately. |
4. | If you use the IPAUSE option, once a pause has been satisfied by a host event, you should call the Query Host Update (24) function to clear the queue prior to the next Pause function. The Pause function will continue to be satisfied with the pending event until the Query Host Update (24) function is completed. |
5. | A practical maximum value for the Pause function is 2400. You should not use the Pause function for these kinds of tasks: |
• | Delay for very long durations (of several hours, for example). |
• | Delay for more than a moderate length of time (20 minutes) before checking the system time-of-day clock and proceeding with your EHLLAPI program execution. |
• | With applications requiring a high-resolution timer because the time interval created by a Pause function is approximate. |
• | Set the time interval to zero in a loop. |
6. | IPAUSE set and the interruptible pause allow an EHLLAPI application to determine whether the specified host presentation space (PS) or operator information area (OIA) is updated. The following three functions are used: |
By using IPAUSE when the Start function is called, you can make an application wait until the host presentation space or OIA (or both) receives an update. When the receive is completed and the application can issue the Query function to determine the changes, Pause terminates. Then the application issues the Search Presentation Space (6) to check whether the expected update occurred.
|