home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pmos2002.zip / DEF / TIMER.DEF < prev    next >
Text File  |  1996-08-28  |  1KB  |  30 lines

  1. DEFINITION MODULE Timer;
  2.  
  3.         (********************************************************)
  4.         (*                                                      *)
  5.         (*                 Timed operations                     *)
  6.         (*                                                      *)
  7.         (*      Author:         P. Moylan                       *)
  8.         (*      Last edited:    28 August 1996                  *)
  9.         (*      Status:         Working                         *)
  10.         (*                                                      *)
  11.         (********************************************************)
  12.  
  13. FROM Semaphores IMPORT
  14.     (* type *)  Semaphore;
  15.  
  16. PROCEDURE Sleep (milliseconds: CARDINAL);
  17.  
  18.     (* Puts the caller to sleep for approximately the given number of   *)
  19.     (* milliseconds.                                                    *)
  20.  
  21. PROCEDURE TimedWait (s: Semaphore;  TimeLimit: INTEGER;
  22.                                         VAR (*OUT*) TimedOut: BOOLEAN);
  23.  
  24.     (* Like a semaphore Wait, except that it returns with TimedOut TRUE *)
  25.     (* if the corresponding Signal does not occur within TimeLimit      *)
  26.     (* milliseconds.                                                    *)
  27.  
  28. END Timer.
  29.  
  30.