fix properties
[AROS.git] / rom / intuition / currenttime.c
blob7bec6e7ec5f46c83e8f494f2a45a20ce87c253f2
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
6 Get the current time.
7 */
9 #include <devices/timer.h>
10 #include <proto/timer.h>
11 #include "intuition_intern.h"
14 /*****************************************************************************
16 NAME */
17 #include <proto/intuition.h>
19 AROS_LH2(void, CurrentTime,
21 /* SYNOPSIS */
22 AROS_LHA(ULONG *, seconds, A0),
23 AROS_LHA(ULONG *, micros, A1),
25 /* LOCATION */
26 struct IntuitionBase *, IntuitionBase, 14, Intuition)
28 /* FUNCTION
29 Copies the current time into the argument pointers.
31 INPUTS
32 seconds - ptr to ULONG varaible which will contain the current
33 seconds after function call
34 micros - ptr to ULONG varaible which will contain the current
35 microseconds after function call
37 RESULT
38 Copies the time values to the memory the arguments point to
39 Return value is not set.
41 NOTES
42 Makes use of timer.library/timer.device
44 EXAMPLE
46 BUGS
48 SEE ALSO
49 timer.device/TR_GETSYSTIME
51 INTERNALS
53 HISTORY
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
59 struct timeval tv;
61 GetSysTime(&tv);
63 if (seconds) *seconds = tv.tv_secs;
64 if (micros) *micros = tv.tv_micro;
66 AROS_LIBFUNC_EXIT
67 } /* CurrentTime */