home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 10
/
Fresh_Fish_10_2352.bin
/
new
/
dev
/
obero
/
oberon-a
/
source
/
amigautil
/
timerutil.mod
< prev
next >
Wrap
Text File
|
1995-06-29
|
1KB
|
51 lines
(***************************************************************************
$RCSfile: TimerUtil.mod $
Description: Support for clients of timer.device
Created by: fjc (Frank Copeland)
$Revision: 3.8 $
$Author: fjc $
$Date: 1995/06/04 23:18:08 $
Copyright © 1994, Frank Copeland.
This file is part of the Oberon-A Library.
See Oberon-A.doc for conditions of use and distribution.
***************************************************************************)
<* STANDARD- *>
MODULE TimerUtil;
IMPORT e := Exec, es := ExecSupport, t := Timer;
(*------------------------------------*)
(*
* An AmigaDOS 1.3 implementation of the AmigaDOS 2.0+ function. Based on
* an example in the 2nd edition RKM:Libraries and Devices.
*)
PROCEDURE GetSysTime * ( req : t.TimeRequestPtr; VAR dest : t.TimeVal );
VAR port : e.MsgPortPtr; result : SHORTINT;
BEGIN (* GetSysTime *)
dest.secs := 0; dest.micro := 0; port := NIL;
IF req.node.message.replyPort = NIL THEN
port := es.CreatePort ("", 0);
IF port # NIL THEN req.node.message.replyPort := port
ELSE RETURN
END
END;
req.node.message.node.type := e.message;
req.node.message.node.pri := 0;
req.node.message.node.name := NIL;
req.node.command := t.getSysTime;
result := e.DoIO (req);
dest := req.time;
IF port # NIL THEN es.DeletePort (port) END
END GetSysTime;
END TimerUtil.