2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: GetSysTime() - Find out what time it is.
9 #include <proto/exec.h>
11 #include "timer_intern.h"
13 /*****************************************************************************
16 #include <devices/timer.h>
17 #include <proto/timer.h>
19 AROS_LH1(void, GetSysTime
,
22 AROS_LHA(struct timeval
*, dest
, A0
),
25 struct Device
*, TimerBase
, 11, Timer
)
28 GetSysTime() will fill in the supplied timeval with the current
32 dest - A pointer to the timeval you want the time stored in.
35 The timeval "dest" will be filled with the current system time.
38 This function is safe to call from interrupts.
45 TR_GETSYSTIME, TR_SETSYSTIME
50 18-02-1997 iaint Implemented.
52 *****************************************************************************/
58 /* Query the hardware */
59 EClockUpdate(GetTimerBase(TimerBase
));
60 dest
->tv_secs
= GetTimerBase(TimerBase
)->tb_CurrentTime
.tv_secs
;
61 dest
->tv_micro
= GetTimerBase(TimerBase
)->tb_CurrentTime
.tv_micro
;