(*
    Title: 	Varioues time related things
    LastEdit:	"Thu Jan  7 17:15:57 1988"
    Author: 	Derek McAuley,Oms1,4663,329629
		Cambridge University Computer Laboratory
*)

DEFINITION MODULE Timers;


EXPORT QUALIFIED
  Value, Type, CallBackProc,
  
  Read, Wait, WaitSecs, CallBack, CallBackSecs, Cancel, Check, NextInterval;

  
TYPE
  Value = 
    RECORD
      secs,
      usecs:CARDINAL;
    END;
  Type = (FromNow, Absolute);
  CallBackProc = PROCEDURE(CARDINAL);


PROCEDURE Read(VAR timeVal:Value);

PROCEDURE Wait(time:Value; type:Type);

PROCEDURE WaitSecs(secs:CARDINAL; type:Type);

PROCEDURE CallBack(
      period:Value; 
      type:  Type; 
      proc:  CallBackProc; 
      arg:   CARDINAL
 );

PROCEDURE CallBackSecs(
      secs:CARDINAL; 
      type:Type; 
      proc:CallBackProc;
      arg: CARDINAL
 );

PROCEDURE Cancel(
      proc:CallBackProc;
      arg: CARDINAL
 );

(*  Rune masters only *)

PROCEDURE Check();

PROCEDURE NextInterval(VAR timeVal:Value);

END Timers.
