Class does not implement OM_SET method.
[tangerine.git] / arch / i386-pc / timer / getsystime.c
blobe64ced865f4a72d003be2fbe75f2784e6f355118
1 /*
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.
6 Lang: english
7 */
8 #include "ticks.h"
9 #include <proto/exec.h>
11 /*****************************************************************************
13 NAME */
14 #include <devices/timer.h>
15 #include <proto/timer.h>
17 AROS_LH1(void, GetSysTime,
19 /* SYNOPSIS */
20 AROS_LHA(struct timeval *, dest, A0),
22 /* LOCATION */
23 struct Device *, TimerBase, 11, Timer)
25 /* FUNCTION
26 GetSysTime() will fill in the supplied timeval with the current
27 system time.
29 INPUTS
30 dest - A pointer to the timeval you want the time stored in.
32 RESULT
33 The timeval "dest" will be filled with the current system time.
35 NOTES
36 This function is safe to call from interrupts.
38 EXAMPLE
40 BUGS
42 SEE ALSO
43 TR_GETSYSTIME, TR_SETSYSTIME
45 INTERNALS
47 HISTORY
48 18-02-1997 iaint Implemented.
50 *****************************************************************************/
52 AROS_LIBFUNC_INIT
53 AROS_LIBBASE_EXT_DECL(struct Library *,TimerBase)
55 struct TimerBase *timerBase = (struct TimerBase *)TimerBase;
57 EClockUpdate(TimerBase);
58 Disable();
59 dest->tv_secs = timerBase->tb_CurrentTime.tv_secs;
60 dest->tv_micro = timerBase->tb_CurrentTime.tv_micro;
61 Enable();
63 AROS_LIBFUNC_EXIT
64 } /* GetSysTime */