summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-25 11:06:09 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-25 11:06:09 (GMT)
commite0be4232971edca23438cc3d79761141f2de124f (patch)
tree7149c8f35615c64e122de1478900f5e8cb516c04 /configure.in
parent92b958420e90b5e98c795db75693310cb9317f95 (diff)
downloadcpython-e0be4232971edca23438cc3d79761141f2de124f.zip
cpython-e0be4232971edca23438cc3d79761141f2de124f.tar.gz
cpython-e0be4232971edca23438cc3d79761141f2de124f.tar.bz2
Close #10278: Add clock_getres(), clock_gettime() and CLOCK_xxx constants to
the time module. time.clock_gettime(time.CLOCK_MONOTONIC) provides a monotonic clock
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 340fe31..7b0a88b 100644
--- a/configure.in
+++ b/configure.in
@@ -2856,6 +2856,20 @@ AC_CHECK_FUNCS(gettimeofday,
])
)
+AC_CHECK_FUNCS(clock_gettime, [], [
+ AC_CHECK_LIB(rt, clock_gettime, [
+ AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
+ AC_DEFINE(TIMEMODULE_LIB, [rt],
+ [Library needed by timemodule.c: librt may be needed for clock_gettime()])
+ ])
+])
+
+AC_CHECK_FUNCS(clock_getres, [], [
+ AC_CHECK_LIB(rt, clock_getres, [
+ AC_DEFINE(HAVE_CLOCK_GETRES, 1)
+ ])
+])
+
AC_MSG_CHECKING(for major, minor, and makedev)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#if defined(MAJOR_IN_MKDEV)