1sys_time.h(0P) POSIX Programmer's Manual sys_time.h(0P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
11
13 sys/time.h — time types
14
16 #include <sys/time.h>
17
19 The <sys/time.h> header shall define the timeval structure, which shall
20 include at least the following members:
21
22 time_t tv_sec Seconds.
23 suseconds_t tv_usec Microseconds.
24
25 The <sys/time.h> header shall define the itimerval structure, which
26 shall include at least the following members:
27
28 struct timeval it_interval Timer interval.
29 struct timeval it_value Current value.
30
31 The <sys/time.h> header shall define the time_t and suseconds_t types
32 as described in <sys/types.h>.
33
34 The <sys/time.h> header shall define the fd_set type as described in
35 <sys/select.h>.
36
37 The <sys/time.h> header shall define the following symbolic constants
38 for the which argument of getitimer() and setitimer():
39
40 ITIMER_REAL Decrements in real time.
41
42 ITIMER_VIRTUAL
43 Decrements in process virtual time.
44
45 ITIMER_PROF Decrements both in process virtual time and when the sys‐
46 tem is running on behalf of the process.
47
48 The <sys/time.h> header shall define the following as described in
49 <sys/select.h>: FD_CLR() FD_ISSET() FD_SET() FD_ZERO() FD_SETSIZE
50
51 The following shall be declared as functions and may also be defined as
52 macros. Function prototypes shall be provided.
53
54 int getitimer(int, struct itimerval *);
55 int gettimeofday(struct timeval *restrict, void *restrict);
56 int setitimer(int, const struct itimerval *restrict,
57 struct itimerval *restrict);
58 int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
59 struct timeval *restrict);
60 int utimes(const char *, const struct timeval [2]);
61
62 Inclusion of the <sys/time.h> header may make visible all symbols from
63 the <sys/select.h> header.
64
65 The following sections are informative.
66
68 None.
69
71 None.
72
74 None.
75
77 <sys_select.h>, <sys_types.h>
78
79 The System Interfaces volume of POSIX.1‐2008, futimens(), getitimer(),
80 gettimeofday(), pselect()
81
83 Portions of this text are reprinted and reproduced in electronic form
84 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
85 -- Portable Operating System Interface (POSIX), The Open Group Base
86 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
87 cal and Electronics Engineers, Inc and The Open Group. (This is
88 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
89 event of any discrepancy between this version and the original IEEE and
90 The Open Group Standard, the original IEEE and The Open Group Standard
91 is the referee document. The original Standard can be obtained online
92 at http://www.unix.org/online.html .
93
94 Any typographical or formatting errors that appear in this page are
95 most likely to have been introduced during the conversion of the source
96 files to man page format. To report such errors, see https://www.ker‐
97 nel.org/doc/man-pages/reporting_bugs.html .
98
99
100
101IEEE/The Open Group 2013 sys_time.h(0P)