home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
fish
/
system_utils
/
clocks
/
setclock
/
include
/
timerdevice.i
< prev
Wrap
Text File
|
1990-10-23
|
1KB
|
52 lines
{
TimerDevice.i
These are the Timer device definitions.
}
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;