2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: GetSysTime() - Find out what time it is.
9 #include <proto/exec.h>
11 /*****************************************************************************
14 #include <devices/timer.h>
15 #include <proto/timer.h>
17 AROS_LH1(void, GetSysTime
,
20 AROS_LHA(struct timeval
*, dest
, A0
),
23 struct Device
*, TimerBase
, 11, Timer
)
26 GetSysTime() will fill in the supplied timeval with the current
30 dest - A pointer to the timeval you want the time stored in.
33 The timeval "dest" will be filled with the current system time.
36 This function is safe to call from interrupts.
43 TR_GETSYSTIME, TR_SETSYSTIME
48 18-02-1997 iaint Implemented.
50 *****************************************************************************/
54 struct TimerBase
*timerBase
= (struct TimerBase
*)TimerBase
;
56 EClockUpdate(TimerBase
);
58 dest
->tv_secs
= timerBase
->tb_CurrentTime
.tv_secs
;
59 dest
->tv_micro
= timerBase
->tb_CurrentTime
.tv_micro
;