posixc.library: convert path unix2amiga in rmdir before passing to stdcio remove
[AROS.git] / rom / intuition / currenttime.c
blob080b55a5c748c92ad50d49ac5a86e36fa184a85d
1 /*
2 Copyright © 1995-2013, 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 *****************************************************************************/
55 AROS_LIBFUNC_INIT
57 struct Library *TimerBase = GetPrivIBase(IntuitionBase)->TimerBase;
58 struct timeval tv;
60 GetSysTime(&tv);
62 if (seconds) *seconds = tv.tv_secs;
63 if (micros) *micros = tv.tv_micro;
65 AROS_LIBFUNC_EXIT
66 } /* CurrentTime */