Added a test for MUIA_Listview_SelectChange.
[AROS.git] / rom / timer / getsystime.c
bloba8b4222f7f71645d5c14bbf586b05191e7c89ef0
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: GetSysTime() - Find out what time it is.
6 Lang: english
7 */
9 #include <proto/exec.h>
11 #include "timer_intern.h"
13 /*****************************************************************************
15 NAME */
16 #include <devices/timer.h>
17 #include <proto/timer.h>
19 AROS_LH1(void, GetSysTime,
21 /* SYNOPSIS */
22 AROS_LHA(struct timeval *, dest, A0),
24 /* LOCATION */
25 struct Device *, TimerBase, 11, Timer)
27 /* FUNCTION
28 GetSysTime() will fill in the supplied timeval with the current
29 system time.
31 INPUTS
32 dest - A pointer to the timeval you want the time stored in.
34 RESULT
35 The timeval "dest" will be filled with the current system time.
37 NOTES
38 This function is safe to call from interrupts.
40 EXAMPLE
42 BUGS
44 SEE ALSO
45 TR_GETSYSTIME, TR_SETSYSTIME
47 INTERNALS
49 HISTORY
50 18-02-1997 iaint Implemented.
52 *****************************************************************************/
54 AROS_LIBFUNC_INIT
56 Disable();
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;
63 Enable();
65 AROS_LIBFUNC_EXIT
66 } /* GetSysTime */