2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: ReadEClock() - read the base frequency of timers.
9 /*****************************************************************************
12 #include <devices/timer.h>
13 #include <proto/timer.h>
14 #include <proto/exec.h>
18 AROS_LH1(ULONG
, ReadEClock
,
21 AROS_LHA(struct EClockVal
*, dest
, A0
),
24 struct TimerBase
*, TimerBase
, 10, Timer
)
27 ReadEClock() reads current value of E-Clock and stores
28 it in the destination EClockVal structure passed as
29 argument. It also returns the frequency of EClock of the
32 This call is supposed to be very fast.
34 dest - Destination EClockVal
37 The EClock frequency (tics/s)
40 This function is safe to call from interrupts.
51 19-08-2005 schulz Implemented.
53 *****************************************************************************/
57 EClockUpdate(TimerBase
);
59 dest
->ev_hi
= (ULONG
)(TimerBase
->tb_ticks_total
>> 32);
60 dest
->ev_lo
= (ULONG
)(TimerBase
->tb_ticks_total
& 0xffffffff);