(*$M-*)
DEFINITION MODULE Timer;

FROM SYSTEM IMPORT
 ADDRESS;
FROM Exec IMPORT
 nonstd,IORequest;

CONST
 timerName="timer.device";
 addRequest=nonstd+0;
 getSysTime=nonstd+1;
 setSysTime=nonstd+2;
 microHz=0;
 vBlank=1;

TYPE
 TimeVal=RECORD
  secs:LONGCARD;
  micro:LONGCARD
 END;
 TimeValPtr=POINTER TO TimeVal;
 IOTimer=RECORD
  node:IORequest;
  time:TimeVal
 END;
 IOTimerPtr=POINTER TO IOTimer;

PROCEDURE AddTime(timer{14}:ADDRESS;
                  dest{8},source{9}:TimeValPtr); CODE -42;
PROCEDURE CmpTime(timer{14}:ADDRESS;
                  tv1{8},
                  tv2{9}:TimeValPtr):INTEGER; CODE -54;
PROCEDURE SubTime(timer{14}:ADDRESS; 
                  dest{8},source{9}:TimeValPtr); CODE -48;

END Timer.
