diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-09-16 14:41:36 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-09-16 21:29:44 -0700 |
commit | 0a1ced59e6fb3c3b11c423e51002c57920480b24 (patch) | |
tree | 643d32e1e7e8342061e3273dfa173aadf033f8e4 /modules | |
parent | 6642aeb47aee3d82978a27497dc9ca57058c66b4 (diff) | |
download | gnulib-0a1ced59e6fb3c3b11c423e51002c57920480b24.tar.gz |
timespec: new function current_timespec
* lib/gettime.c (gettime): Prefer clock_gettime to nanotime,
and don’t worry about it failing on a CLOCK_REALTIME arg.
POSIX requires it to succeed and I don’t know of any
counterexamples where the fallbacks would work.
(current_timespec): New function, taken from Emacs. It is more
convenient than gettime, and can help register allocation.
* lib/timespec.h: Include arg-nonnull.h.
(current_timespec): New declaration.
(gettime, settime): Declare args to be nonnull.
* modules/timespec (Depends-on): Add snippet/arg-nonnull.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/timespec | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/timespec b/modules/timespec index e6e151482f..956cfea225 100644 --- a/modules/timespec +++ b/modules/timespec @@ -8,6 +8,7 @@ m4/timespec.m4 Depends-on: extern-inline +snippet/arg-nonnull time verify |