summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-03-08 17:00:48 +0100
committerBruno Haible <bruno@clisp.org>2023-03-08 17:01:54 +0100
commitcbc0c1cda32bbcfab3ed0391cb9cfde444323571 (patch)
treee0a312f54ebc5cfad764e3a869fcf4b23f4563bc /doc
parent3ef8e9910ae8f0e5d63cff8f37e22bb5aa9109ae (diff)
downloadgnulib-cbc0c1cda32bbcfab3ed0391cb9cfde444323571.tar.gz
time: New module.
* lib/time.in.h (time): New declaration. * lib/time.c: New file. * m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS): Initialize GNULIB_TIME. (gl_TIME_H_DEFAULTS): Initialize REPLACE_TIME. * m4/time.m4: New file. * modules/time-h (Makefile.am): Substitute GNULIB_TIME, REPLACE_TIME. * modules/time: New file. * tests/test-time-h-c++.cc: Check the signature of GNULIB_NAMESPACE::time. * doc/posix-functions/time.texi: Mention the glibc problem and the 'time' module.
Diffstat (limited to 'doc')
-rw-r--r--doc/posix-functions/time.texi10
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/posix-functions/time.texi b/doc/posix-functions/time.texi
index 765de7aa2a..a8e9abcddf 100644
--- a/doc/posix-functions/time.texi
+++ b/doc/posix-functions/time.texi
@@ -4,10 +4,18 @@
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/time.html}
-Gnulib module: ---
+Gnulib module: time
Portability problems fixed by Gnulib:
@itemize
+@item
+This function is not consistent with @code{gettimeofday} and @code{timespec_get}
+on some platforms:
+@c https://sourceware.org/bugzilla/show_bug.cgi?id=30200
+glibc 2.31 or newer on Linux.
+Namely, in the first 1 to 2.5 milliseconds of every second, @code{time}
+returns a value that is one less than the @code{tv_sec} part of the return
+value of @code{gettimeofday} or @code{timespec_get}.
@end itemize
Portability problems not fixed by Gnulib: