2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id: getsystime.c 20492 2004-01-03 18:46:50Z schulz $
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 *****************************************************************************/
53 AROS_LIBBASE_EXT_DECL(struct Library
*,TimerBase
)
55 struct TimerBase
*timerBase
= (struct TimerBase
*)TimerBase
;
57 EClockUpdate(TimerBase
);
59 dest
->tv_secs
= timerBase
->tb_CurrentTime
.tv_secs
;
60 dest
->tv_micro
= timerBase
->tb_CurrentTime
.tv_micro
;