As documented in the STANDARDS section, gettimeofday(2) was deprecated
in POSIX.1-2008 and removed in POSIX.1-2024. Mark it and
settimeofday(2) with [[deprecated]], and mention clock_settime(2) as a
modern and standardized alternative to settimeofday(2).
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Message-ID: <
2d37d5a9251af3c1d25cf8e73e3585a9955d5772.
1750373011.git.collin.funk1@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
.nf
.B #include <sys/time.h>
.P
+.B [[deprecated]]
.BI "int gettimeofday(struct timeval *restrict " tv ,
.BI " struct timezone *_Nullable restrict " tz );
+.B [[deprecated]]
.BI "int settimeofday(const struct timeval *" tv ,
.BI " const struct timezone *_Nullable " tz );
.fi
as obsolete, recommending the use of
.BR clock_gettime (2)
instead.
+Likewise,
+.BR clock_settime (2)
+should be used instead of
+.BR settimeofday ().
POSIX.1-2024 removed
.BR gettimeofday ().
.P