Program  waitw;
{$NOMAIN}

{
  Version
  File:[22,310]waitw.PAS
  Author: Jim Bostwick  20-Oct-83

  Last Edit:  23-JUN-1988 22:40:17 

  History:
	 23-JUN-1988 22:00:18  - JMB PA3UTL upgrade.



}
{$NOLIST}
{[a+,b+,l-,k+,r+] Pasmat }
%INCLUDE PAS$EXT:General.typ;
%INCLUDE 'PAS$EXT:MRKT.EXT';
%INCLUDE 'PAS$EXT:WTSE.EXT';
{$LIST}


{---------------- Wait task for specified time ---------------------------}

procedure waitw(efn:event_flag;
                   Count: Integer;
                   Units: Time_Unit
  		);External;

{*USER*
 Procedure waitw issues a MRKT directive, followed by a WAIT for efn.
The result is to halt the calling task for the specified duration.
The WAIT is not issued if the MRKT directive fails. Works with
all event flags.
 Directive status is available in $DSW on return.
 Companion procedure WAIT issues a STOP for efn, rather than a
WAIT for efn - which is generally better. If you don't know the
difference, or don't care, use WAIT rather then WAITW.  
}


procedure waitw;


BEGIN
  MRKT(efn,count,units);
  if $dsw > 0 then wtse(efn)
end;

