Pause (18)

Top  Previous  Next

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




Contains the pause duration in half-second increments


PS Position





Return Parameters


Return Code



The wait duration has expired.


An internal system error was encountered. The time results are unpredictable.


The host session presentation space or OIA has been updated. Use the Query Host Update (24) function to get more information.





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:
Start Host Notification (23)
Query Host Update (24)
Stop Host Notification (25)


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.