diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-12-28 11:39:17 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-12-28 12:04:49 -0800 |
commit | af4148ce0197502ce017418871da592bd7be5d91 (patch) | |
tree | 02a6445aedcd4511f885bd36401935e411844796 /modules | |
parent | 0f42dafa9e0a8dab8d6f97dd70967cb3d8a922da (diff) | |
download | gnulib-af4148ce0197502ce017418871da592bd7be5d91.tar.gz |
timespec_getres: new module
* lib/time.in.h (timespec_getres): New decl.
* lib/timespec_getres.c, m4/timespec_getres.m4:
* modules/timespec_getres, modules/timespec_getres-tests:
* tests/test-timespec_getres.c:
New files.
* m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS, gl_TIME_H_DEFAULTS):
* modules/time (time.h):
Support timespec_getres.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/time | 2 | ||||
-rw-r--r-- | modules/timespec_getres | 32 | ||||
-rw-r--r-- | modules/timespec_getres-tests | 13 |
3 files changed, 47 insertions, 0 deletions
diff --git a/modules/time b/modules/time index fe38a50485..ae8471bb9e 100644 --- a/modules/time +++ b/modules/time @@ -40,6 +40,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ -e 's/@''GNULIB_TIMESPEC_GET''@/$(GNULIB_TIMESPEC_GET)/g' \ + -e 's/@''GNULIB_TIMESPEC_GETRES''@/$(GNULIB_TIMESPEC_GETRES)/g' \ -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \ -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \ @@ -49,6 +50,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \ + -e 's|@''HAVE_TIMESPEC_GETRES''@|$(HAVE_TIMESPEC_GETRES)|g' \ -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \ -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \ -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ diff --git a/modules/timespec_getres b/modules/timespec_getres new file mode 100644 index 0000000000..f9672868e3 --- /dev/null +++ b/modules/timespec_getres @@ -0,0 +1,32 @@ +Description: +timespec_getres: return the timestamp resolution + +Files: +lib/timespec_getres.c +m4/timespec_getres.m4 + +Depends-on: +extensions +time +gettime-res [test $HAVE_TIMESPEC_GETRES = 0] + +configure.ac: +AC_REQUIRE([gl_FUNC_TIMESPEC_GETRES]) +if test $HAVE_TIMESPEC_GETRES = 0; then + AC_LIBOBJ([timespec_getres]) +fi +gl_TIME_MODULE_INDICATOR([timespec_getres]) + +Makefile.am: + +Include: +<time.h> + +Link: +$(LIB_CLOCK_GETTIME) + +License: +LGPL + +Maintainer: +all diff --git a/modules/timespec_getres-tests b/modules/timespec_getres-tests new file mode 100644 index 0000000000..9bb83cc795 --- /dev/null +++ b/modules/timespec_getres-tests @@ -0,0 +1,13 @@ +Files: +tests/test-timespec_getres.c +tests/signature.h +tests/macros.h + +Depends-on: + +configure.ac: + +Makefile.am: +TESTS += test-timespec_getres +check_PROGRAMS += test-timespec_getres +test_timespec_getres_LDADD = $(LDADD) @LIB_CLOCK_GETTIME@ |