1GETTIMEOFDAY(P) POSIX Programmer's Manual GETTIMEOFDAY(P)
2
3
4
6 gettimeofday - get the date and time
7
9 #include <sys/time.h>
10
11 int gettimeofday(struct timeval *restrict tp, void *restrict tzp);
12
13
15 The gettimeofday() function shall obtain the current time, expressed as
16 seconds and microseconds since the Epoch, and store it in the timeval
17 structure pointed to by tp. The resolution of the system clock is
18 unspecified.
19
20 If tzp is not a null pointer, the behavior is unspecified.
21
23 The gettimeofday() function shall return 0 and no value shall be
24 reserved to indicate an error.
25
27 No errors are defined.
28
29 The following sections are informative.
30
32 None.
33
35 None.
36
38 None.
39
41 None.
42
44 ctime() , ftime() , the Base Definitions volume of
45 IEEE Std 1003.1-2001, <sys/time.h>
46
48 Portions of this text are reprinted and reproduced in electronic form
49 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
50 -- Portable Operating System Interface (POSIX), The Open Group Base
51 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
52 Electrical and Electronics Engineers, Inc and The Open Group. In the
53 event of any discrepancy between this version and the original IEEE and
54 The Open Group Standard, the original IEEE and The Open Group Standard
55 is the referee document. The original Standard can be obtained online
56 at http://www.opengroup.org/unix/online.html .
57
58
59
60IEEE/The Open Group 2003 GETTIMEOFDAY(P)