revert between 56095 -> 55830 in arch
[AROS.git] / arch / ppc-chrp / efika / timer / getsystime.c
blob97257dac0e3893908d55958f125a9340ae5806ff
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: GetSysTime() - Find out what time it is.
6 Lang: english
7 */
8 #include "lowlevel.h"
9 #include <proto/exec.h>
11 #include <devices/timer.h>
12 #include <proto/timer.h>
14 /* See rom/timer/getsystime.c for documentation */
16 AROS_LH1(void, GetSysTime,
17 AROS_LHA(struct timeval *, dest, A0),
18 struct Device *, TimerBase, 11, Timer)
20 AROS_LIBFUNC_INIT
22 struct TimerBase *timerBase = (struct TimerBase *)TimerBase;
24 Disable();
25 EClockUpdate(TimerBase);
26 dest->tv_secs = timerBase->tb_CurrentTime.tv_secs;
27 dest->tv_micro = timerBase->tb_CurrentTime.tv_micro;
28 Enable();
30 AROS_LIBFUNC_EXIT
31 } /* GetSysTime */