home *** CD-ROM | disk | FTP | other *** search
-
- {
- TimerDevice.i
-
- These are the Timer device definitions.
- }
-
- {$I "Include/ExecIO.i"}
-
- CONST
- UnitMicroHz = 0;
- UnitVBlank = 1;
-
- CONST
- TimerName = "timer.device";
-
- {
- TimerBase is used by the routines that perform the actual
- calls to AddTime, SubTime, and CmpTime declared below. TimerBase
- is set by a call to CreateTimer (declared in TimerUtils.i), but
- you can also set it by opening the timer.device with OpenDevice,
- then pulling the Device pointer from the TimerRequest record. I
- prefer the first way, frankly.
- }
-
- VAR
- TimerBase : Address;
-
- TYPE
- TimeVal = record
- tvSecs,
- tvMicro : Integer;
- end;
-
- TimerRequest = record
- trNode : IORequest;
- trTime : TimeVal;
- end;
- TimerRequestPtr = ^TimerRequest;
-
- const
- TR_ADDREQUEST = CMD_NONSTD;
- TR_GETSYSTIME = CMD_NONSTD + 1;
- TR_SETSYSTIME = CMD_NONSTD + 2;
-
- Procedure AddTime(VAR Dest, Source : TimeVal);
- External;
-
- Function CmpTime(VAR Dest, Source : TimeVal) : Integer;
- External;
-
- Procedure SubTime(VAR Dest, Source : TimeVal);
- External;
-
-