$WakeUp: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
(Automatically generated page update)
 
(26 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$WakeUp}}
{{DISPLAYTITLE:$WakeUp}}
<span class="pageSubtitle"><section begin="desc" />Pause user until specified time<section end="desc" /></span>
<span class="pageSubtitle">Pause user until specified time</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $WakeUp function is [[to be entered]].</p>
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $WakeUp function.</p>


This function can be used to have the user pause until a particular time. The chief advantages of $WakeUp over the PAUSE statement are
The $WakeUp function accepts three arguments and returns a number that is the number of milliseconds since the Online was brought up. It is a [[Calling Sirius Mods $functions|callable]] $function .  
<ul>


<li>You can wake up at a particular time rather than after a particular number of seconds have passed.
==Syntax==
<li>$WakeUp has millisecond resolution versus the second resolution of the PAUSE statement.
<p class="syntax">[%time =] $WakeUp(wake_time, rqtm_flag, [option])
<li>$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.
</p>
<li>$WakeUp will allow a user to break in with a terminal interrupt on VTAM full screen terminals.
</ul>


===Syntax terms===
<table>
<tr><th>%time</th>
<td>A positive integer.</td></tr>


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 .  
<tr><th>wake_time</th>
<td>A number indicating the time to wake up, expressed as milliseconds since the Online was brought up.
<p>Use %TIME = $WakeUp(0) to acquire the time, in milliseconds, since the run came up. For subsequent $WakeUp calls, %TIME can then be used as the base time for the wake_time parameter.  See the following example.</p></td></tr>


The first argument is a number indicating the time to wake up expressed as milliseconds since the online was brought up.  
<tr><th>rqtm_flag</th>
<td>A number, which if present and non-zero, indicates that the wait time is not to be included as part of RQTM. </td></tr>


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.
<tr><th>option</th>
 
<td>An optional string (<code>NOURGMSG</code>, case unimportant) that prevents a user paused by <var>$WakeUp</var> from being immediately wakened if a <code>BROADCAST URGENT</code> message is sent. </td></tr>
The third argument is an optional string (<tt>NOURGMSG</tt>, case unimportant) that prevents a user paused by $WakeUp from being immediately wakened if a BROADCAST URGENT message is sent.  
</table>
 
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==
<p class="syntax"><section begin="syntax" /> [%TIME =] $WakeUp(wake_time, rqtm_flag, [option])
<section end="syntax" /></p>
<p class="caption">$WakeUp Function
</p>
<p class="caption">%TIME is a positive integer.</p>


==Usage notes==
<ul>
<li>The chief advantages of <var>$WakeUp</var> over the <var>PAUSE</var> statement are
<ul>
<li>You can wake up at a particular time rather than after a particular number of seconds have passed.
<li><var>$WakeUp</var> has millisecond resolution versus the second resolution of the <var>PAUSE</var> statement.
<li><var>$WakeUp</var> 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.
<li><var>$WakeUp</var> will allow a user to break in with a terminal interrupt on VTAM full screen terminals.
</ul>
</ul>


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


In the following code fragment, three screens are automatically displayed for 2.3 seconds each. The sleep time is not counted toward RQTM.
<p class="code">%TIME = $WakeUp(0)
<p class="code"> %TIME = $WakeUp(0)
%RC = $FakeEnt
%RC = $FakeEnt
READ SCREEN SCREEN1
READ SCREEN SCREEN1
%TIME = $WakeUp( %TIME + 2300, 1)
%TIME = $WakeUp( %TIME + 2300, 1)
   
   
%RC = $FakeEnt
%RC = $FakeEnt
READ SCREEN SCREEN2
READ SCREEN SCREEN2
%TIME = $WakeUp( %TIME + 2300, 1)
%TIME = $WakeUp( %TIME + 2300, 1)
%RC = $FakeEnt
READ SCREEN SCREEN3
%TIME = $WakeUp( %TIME + 2300, 1)
   
   
%RC = $FakeEnt
READ SCREEN SCREEN3
%TIME = $WakeUp( %TIME + 2300, 1)
</p>
</p>
<p class="code">
<ul>
<li>&SFUNC


==Products authorizing {{PAGENAMEE}}==
<ul class="smallAndTightList">
<li>[[List of $functions|Sirius functions]]</li>
</ul>
</ul>
</p>
<p class="caption">Products authorizing $WakeUp
</p>




[[Category:$Functions|$WakeUp]]
[[Category:$Functions|$WakeUp]]

Latest revision as of 23:31, 20 September 2018

Pause user until specified time

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

The $WakeUp function accepts three arguments and returns a number that is the number of milliseconds since the Online was brought up. It is a callable $function .

Syntax

[%time =] $WakeUp(wake_time, rqtm_flag, [option])

Syntax terms

%time A positive integer.
wake_time A number indicating the time to wake up, expressed as milliseconds since the Online was brought up.

Use %TIME = $WakeUp(0) to acquire the time, in milliseconds, since the run came up. For subsequent $WakeUp calls, %TIME can then be used as the base time for the wake_time parameter. See the following example.

rqtm_flag A number, which if present and non-zero, indicates that the wait time is not to be included as part of RQTM.
option An optional string (NOURGMSG, case unimportant) that prevents a user paused by $WakeUp from being immediately wakened if a BROADCAST URGENT message is sent.

Usage notes

  • 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.

Example

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