DEFINITION MODULE Timer;

        (********************************************************)
        (*                                                      *)
        (*                 Timed operations                     *)
        (*                                                      *)
        (*      Author:         P. Moylan                       *)
        (*      Last edited:    28 August 1996                  *)
        (*      Status:         Working                         *)
        (*                                                      *)
        (********************************************************)

FROM Semaphores IMPORT
    (* type *)  Semaphore;

PROCEDURE Sleep (milliseconds: CARDINAL);

    (* Puts the caller to sleep for approximately the given number of   *)
    (* milliseconds.                                                    *)

PROCEDURE TimedWait (s: Semaphore;  TimeLimit: INTEGER;
                                        VAR (*OUT*) TimedOut: BOOLEAN);

    (* Like a semaphore Wait, except that it returns with TimedOut TRUE *)
    (* if the corresponding Signal does not occur within TimeLimit      *)
    (* milliseconds.                                                    *)

END Timer.

