$WakeUp: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
(No difference)

Revision as of 19:29, 25 October 2012

Pause user until specified time

Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $WakeUp function.

This function can be used to have the user pause until a particular time. The chief advantages of $WakeUp over the PAUSE statement are

  • You can wake up at a particular time rather than after a particular number of seconds have passed.
  • $WakeUp has millisecond resolution versus the second resolution of the PAUSE statement.
  • $WakeUp allows the wait time to not be counted toward RQTM. This is useful in cases where the pause is simply a standard part of processing rather than a pause to allow some condition to clear.
  • $WakeUp will allow a user to break in with a terminal interrupt on VTAM full screen terminals.

The $WakeUp function accepts three arguments and returns a number that is the number of milliseconds since the online was brought up. As of Sirius Mods Version 6.8, it is a callable $function .

The first argument is a number indicating the time to wake up expressed as milliseconds since the online was brought up.

The second argument is a number, which if present and non-zero, indicates that the wait time is not to be included as part of RQTM.

The third argument is an optional string (NOURGMSG, case unimportant) that prevents a user paused by $WakeUp from being immediately wakened if a BROADCAST URGENT message is sent.

The third argument is available as of Sirius Mods Version 7.2. Prior to Sirius Mods 7.2, $WakeUp completes immediately if a BROADCAST URGENT message is sent to the user. The functionality of this argument is also available (though not controlled by an argument) via zap in Sirius Mods 6.7 and 7.1, as described in the Sirius Mods Release Notes for those versions.

Syntax

<section begin="syntax" />[%TIME =] $WakeUp(wake_time, rqtm_flag, [option]) <section end="syntax" />

$WakeUp Function

%TIME is a positive integer.

In the following code fragment, three screens are automatically displayed for 2.3 seconds each. The sleep time is not counted toward RQTM.

%TIME = $WakeUp(0) %RC = $FakeEnt READ SCREEN SCREEN1 %TIME = $WakeUp( %TIME + 2300, 1) %RC = $FakeEnt READ SCREEN SCREEN2 %TIME = $WakeUp( %TIME + 2300, 1) %RC = $FakeEnt READ SCREEN SCREEN3 %TIME = $WakeUp( %TIME + 2300, 1)

Products authorizing $WakeUp