]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3type/time_t.3type
Many pages: Use man3type/ and man2type/ for type pages
[thirdparty/man-pages.git] / man3type / time_t.3type
CommitLineData
c5434ec8
AC
1.\" Copyright (c) 2020-2022 by Alejandro Colomar <colomar.6.4.3@gmail.com>
2.\" and Copyright (c) 2020 by Michael Kerrisk <mtk.manpages@gmail.com>
3.\"
4.\" SPDX-License-Identifier: Linux-man-pages-copyleft
5.\"
6.\"
7.TH TIME_T 3type 2022-07-20 Linux "Linux Programmer's Manual"
8.SH NAME
9time_t, suseconds_t, useconds_t \- integer time
10.SH LIBRARY
11Standard C library
12.RI ( libc )
13.SH SYNOPSIS
14.nf
15.B #include <time.h>
16.PP
17.BR typedef " /* ... */ " time_t;
18.PP
19.B #include <sys/types.h>
20.PP
21.BR typedef " /* ... */ " suseconds_t;
22.BR typedef " /* ... */ " useconds_t;
23.fi
24.SH DESCRIPTION
25.TP
26.I time_t
27Used for time in seconds.
28According to POSIX,
29it shall be an integer type.
30.\" In POSIX.1-2001, the type was specified as being either an integer
31.\" type or a real-floating type. However, existing implementations
32.\" used an integer type, and POSIX.1-2008 tightened the specification
33.\" to reflect this.
34.TP
35.I suseconds_t
36Used for time in microseconds.
37According to POSIX,
38it shall be a signed integer type
39capable of storing values al least in the range
40.RB [ \-1 ,
41.BR 1000000 ].
42.TP
43.I useconds_t
44Used for time in microseconds.
45According to POSIX,
46it shall be an unsigned integer type
47capable of storing values al least in the range
48.RB [ 0 ,
49.BR 1000000 ].
50.PP
51According to POSIX,
52the implementation shall support one or more programming environments
53where the width of
54.I suseconds_t
55and
56.I useconds_t
57is no greater than the width of the type
58.IR long .
59.SH VERSIONS
60.TP
61.I time_t
62.I <sched.h>
63defines
64.I time_t
65since POSIX.1-2008.
66.TP
67.I suseconds_t
68POSIX.1-2001 defined
69.I useconds_t
70in
71.I <unistd.h>
72too.
73.SH CONFORMING TO
74.PD 0
75.IR time_t :
76C99 and later.
77POSIX.1-2001 and later.
78.PP
79.IR suseconds_t :
80POSIX.1-2001 and later.
81.PP
82.IR useconds_t :
83POSIX.1-2001 and later.
84.PD
85.SH NOTES
86.TP
87.I time_t
88The following headers also provide
89.IR time_t :
90.IR <sched.h> ,
91.IR <sys/msg.h> ,
92.IR <sys/select.h> ,
93.IR <sys/sem.h> ,
94.IR <sys/shm.h> ,
95.IR <sys/stat.h> ,
96.IR <sys/time.h> ,
97.IR <sys/types.h> ,
98and
99.IR <utime.h> .
100.TP
101.I suseconds_t
102The following headers also provide
103.IR suseconds_t :
104.I <sys/select.h>
105and
106.IR <sys/time.h> .
107.SH SEE ALSO
108.BR stime (2),
109.BR time (2),
110.BR ctime (3),
111.BR difftime (3),
112.BR usleep (3),
113.BR timeval (3type)