2 Copyright © 2009-2013, The AROS Development Team. All rights reserved
9 #include <devices/timer.h>
11 #include <proto/exec.h>
12 #include <aros/debug.h>
13 #include <proto/timer.h>
18 struct IORequest
*ata_OpenTimer(void)
20 struct MsgPort
*p
= CreateMsgPort();
24 struct IORequest
*io
= CreateIORequest(p
, sizeof(struct timerequest
));
28 if (0 == OpenDevice("timer.device", UNIT_MICROHZ
, io
, 0))
40 void ata_CloseTimer(struct IORequest
*tmr
)
44 struct MsgPort
*p
= tmr
->io_Message
.mn_ReplyPort
;
52 void ata_WaitTO(struct IORequest
* tmr
, ULONG secs
, ULONG micro
)
54 tmr
->io_Command
= TR_ADDREQUEST
;
55 ((struct timerequest
*)tmr
)->tr_time
.tv_secs
= secs
;
56 ((struct timerequest
*)tmr
)->tr_time
.tv_micro
= micro
;