Minor fixes to comments.
[AROS.git] / rom / intuition / currenttime.c
blobbc38d06b7d18ff90b1a2218625b718165d6752eb
1 /*
2 Copyright © 1995-2011, 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 Library *TimerBase = GetPrivIBase(IntuitionBase)->TimerBase;
60 struct timeval tv;
62 GetSysTime(&tv);
64 if (seconds) *seconds = tv.tv_secs;
65 if (micros) *micros = tv.tv_micro;
67 AROS_LIBFUNC_EXIT
68 } /* CurrentTime */