home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / disks / disk390.lzh / SetClock / Include / TimerDevice.i < prev   
Text File  |  1990-10-23  |  1KB  |  52 lines

  1. {
  2.         TimerDevice.i
  3.  
  4.         These are the Timer device definitions.
  5. }
  6.  
  7. CONST
  8.     UnitMicroHz = 0;
  9.     UnitVBlank  = 1;
  10.  
  11. CONST
  12.     TimerName   = "timer.device";
  13.  
  14. {
  15.         TimerBase is used by the routines that perform the actual
  16.    calls to AddTime, SubTime, and CmpTime declared below.  TimerBase
  17.    is set by a call to CreateTimer (declared in TimerUtils.i), but
  18.    you can also set it by opening the timer.device with OpenDevice,
  19.    then pulling the Device pointer from the TimerRequest record.  I
  20.    prefer the first way, frankly.
  21. }
  22.  
  23. VAR
  24.     TimerBase : Address;
  25.  
  26. TYPE
  27.     TimeVal = record
  28.         tvSecs,
  29.         tvMicro : Integer;
  30.     end;
  31.  
  32.     TimerRequest = record
  33.         trNode  : IORequest;
  34.         trTime  : TimeVal;
  35.     end;
  36.     TimerRequestPtr = ^TimerRequest;
  37.  
  38. const
  39.     TR_ADDREQUEST = CMD_NONSTD;
  40.     TR_GETSYSTIME = CMD_NONSTD + 1;
  41.     TR_SETSYSTIME = CMD_NONSTD + 2;
  42.  
  43. Procedure AddTime(VAR Dest, Source : TimeVal);
  44.     External;
  45.  
  46. Function CmpTime(VAR Dest, Source : TimeVal) : Integer;
  47.     External;
  48.  
  49. Procedure SubTime(VAR Dest, Source : TimeVal);
  50.     External;
  51.  
  52.