1<sys/time.h>(P) POSIX Programmer's Manual <sys/time.h>(P)
2
3
4
6 sys/time.h - time types
7
9 #include <sys/time.h>
10
12 The <sys/time.h> header shall define the timeval structure that
13 includes at least the following members:
14
15
16 time_t tv_sec Seconds.
17 suseconds_t tv_usec Microseconds.
18
19 The <sys/time.h> header shall define the itimerval structure that
20 includes at least the following members:
21
22
23 struct timeval it_interval Timer interval.
24 struct timeval it_value Current value.
25
26 The time_t and suseconds_t types shall be defined as described in
27 <sys/types.h> .
28
29 The fd_set type shall be defined as described in <sys/select.h> .
30
31 The <sys/time.h> header shall define the following values for the which
32 argument of getitimer() and setitimer():
33
34 ITIMER_REAL
35 Decrements in real time.
36
37 ITIMER_VIRTUAL
38 Decrements in process virtual time.
39
40 ITIMER_PROF
41 Decrements both in process virtual time and when the system is
42 running on behalf of the process.
43
44
45 The following shall be defined as described in <sys/select.h> :
46 FD_CLR() FD_ISSET() FD_SET() FD_ZERO() FD_SETSIZE
47
48 The following shall be declared as functions and may also be defined as
49 macros. Function prototypes shall be provided.
50
51
52 int getitimer(int, struct itimerval *);
53 int gettimeofday(struct timeval *restrict, void *restrict);
54 int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
55 struct timeval *restrict);
56 int setitimer(int, const struct itimerval *restrict,
57 struct itimerval *restrict);
58 int utimes(const char *, const struct timeval [2]); (LEGACY )
59
60 Inclusion of the <sys/time.h> header may make visible all symbols from
61 the <sys/select.h> header.
62
63 The following sections are informative.
64
66 None.
67
69 None.
70
72 None.
73
75 <sys/select.h> , <sys/types.h> , the System Interfaces volume of
76 IEEE Std 1003.1-2001, getitimer(), gettimeofday(), select(),
77 setitimer()
78
80 Portions of this text are reprinted and reproduced in electronic form
81 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
82 -- Portable Operating System Interface (POSIX), The Open Group Base
83 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
84 Electrical and Electronics Engineers, Inc and The Open Group. In the
85 event of any discrepancy between this version and the original IEEE and
86 The Open Group Standard, the original IEEE and The Open Group Standard
87 is the referee document. The original Standard can be obtained online
88 at http://www.opengroup.org/unix/online.html .
89
90
91
92IEEE/The Open Group 2003 <sys/time.h>(P)