summaryrefslogtreecommitdiffstats
path: root/man2/gettimeofday.2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
commit3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch)
tree3ee7a3ec64525911fa865bb984c86d997d855527 /man2/gettimeofday.2
parentAdding debian version 6.05.01-1. (diff)
downloadmanpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz
manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man2/gettimeofday.2')
-rw-r--r--man2/gettimeofday.240
1 files changed, 20 insertions, 20 deletions
diff --git a/man2/gettimeofday.2 b/man2/gettimeofday.2
index 8381cc0..cd8bc84 100644
--- a/man2/gettimeofday.2
+++ b/man2/gettimeofday.2
@@ -17,7 +17,7 @@
.\" Modified, 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on capability requirement.
.\"
-.TH gettimeofday 2 2023-07-28 "Linux man-pages 6.05.01"
+.TH gettimeofday 2 2023-10-31 "Linux man-pages 6.7"
.SH NAME
gettimeofday, settimeofday \- get / set time
.SH LIBRARY
@@ -26,18 +26,18 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <sys/time.h>
-.PP
+.P
.BI "int gettimeofday(struct timeval *restrict " tv ,
.BI " struct timezone *_Nullable restrict " tz );
.BI "int settimeofday(const struct timeval *" tv ,
.BI " const struct timezone *_Nullable " tz );
.fi
-.PP
+.P
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
.BR settimeofday ():
.nf
Since glibc 2.19:
@@ -51,14 +51,14 @@ The functions
and
.BR settimeofday ()
can get and set the time as well as a timezone.
-.PP
+.P
The
.I tv
argument is a
.I struct timeval
(as specified in
.IR <sys/time.h> ):
-.PP
+.P
.in +4n
.EX
struct timeval {
@@ -67,15 +67,15 @@ struct timeval {
};
.EE
.in
-.PP
+.P
and gives the number of seconds and microseconds since the Epoch (see
.BR time (2)).
-.PP
+.P
The
.I tz
argument is a
.IR "struct timezone" :
-.PP
+.P
.in +4n
.EX
struct timezone {
@@ -84,7 +84,7 @@ struct timezone {
};
.EE
.in
-.PP
+.P
If either
.I tv
or
@@ -96,17 +96,17 @@ is NULL, the corresponding structure is not set or returned.
.I tv
is NULL.)
.\" The following is covered under EPERM below:
-.\" .PP
+.\" .P
.\" Only the superuser may use
.\" .BR settimeofday ().
-.PP
+.P
The use of the
.I timezone
structure is obsolete; the
.I tz
argument should normally be specified as NULL.
(See NOTES below.)
-.PP
+.P
Under Linux, there are some peculiar "warp clock" semantics associated
with the
.BR settimeofday ()
@@ -175,11 +175,11 @@ On some architectures, an implementation of
.BR gettimeofday ()
is provided in the
.BR vdso (7).
-.PP
+.P
The kernel accepts NULL for both
.I tv
and
-.IR tz.
+.IR tz .
The timezone argument is ignored by glibc and musl,
and not passed to/from the kernel.
Android's bionic passes the timezone argument to/from the kernel,
@@ -204,7 +204,7 @@ POSIX.1-2008 marks
as obsolete, recommending the use of
.BR clock_gettime (2)
instead.
-.PP
+.P
Traditionally, the fields of
.I struct timeval
were of type
@@ -235,7 +235,7 @@ or
.\" Each and every occurrence of this field in the kernel source
.\" (other than the declaration) is a bug.
Thus, the following is purely of historical interest.
-.PP
+.P
On old systems, the field
.I tz_dsttime
contains a symbolic constant (values are given below)
@@ -245,7 +245,7 @@ is in force.
it does not indicate that DST is in force, it just selects an
algorithm.)
The daylight saving time algorithms defined are as follows:
-.PP
+.P
.in +4n
.EX
\fBDST_NONE\fP /* not on DST */
@@ -261,7 +261,7 @@ The daylight saving time algorithms defined are as follows:
\fBDST_AUSTALT\fP /* Australian style with shift in 1986 */
.EE
.in
-.PP
+.P
Of course it turned out that the period in which
Daylight Saving Time is in force cannot be given
by a simple algorithm, one per country; indeed,
@@ -277,7 +277,7 @@ affected by discontinuous jumps in the system time
(e.g., if the system administrator manually changes the system time).
If you need a monotonically increasing clock, see
.BR clock_gettime (2).
-.PP
+.P
Macros for operating on
.I timeval
structures are described in