1 .\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
2 .TH "GETTIMEOFDAY" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
5 gettimeofday \- get the date and time
8 \fB#include <sys/time.h>
11 int gettimeofday(struct timeval *restrict\fP \fItp\fP\fB, void *restrict\fP
18 The \fIgettimeofday\fP() function shall obtain the current time, expressed
19 as seconds and microseconds since the Epoch, and
20 store it in the \fBtimeval\fP structure pointed to by \fItp\fP. The
21 resolution of the system clock is unspecified.
23 If \fItzp\fP is not a null pointer, the behavior is unspecified.
26 The \fIgettimeofday\fP() function shall return 0 and no value shall
27 be reserved to indicate an error.
30 No errors are defined.
32 \fIThe following sections are informative.\fP
47 \fIctime\fP() , \fIftime\fP() , the Base Definitions volume of
48 IEEE\ Std\ 1003.1-2001, \fI<sys/time.h>\fP
50 Portions of this text are reprinted and reproduced in electronic form
51 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
52 -- Portable Operating System Interface (POSIX), The Open Group Base
53 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
54 Electrical and Electronics Engineers, Inc and The Open Group. In the
55 event of any discrepancy between this version and the original IEEE and
56 The Open Group Standard, the original IEEE and The Open Group Standard
57 is the referee document. The original Standard can be obtained online at
58 http://www.opengroup.org/unix/online.html .