diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-25 11:06:09 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-25 11:06:09 (GMT) |
commit | e0be4232971edca23438cc3d79761141f2de124f (patch) | |
tree | 7149c8f35615c64e122de1478900f5e8cb516c04 /setup.py | |
parent | 92b958420e90b5e98c795db75693310cb9317f95 (diff) | |
download | cpython-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 'setup.py')
-rw-r--r-- | setup.py | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -504,11 +504,17 @@ class PyBuildExt(build_ext): exts.append( Extension('math', ['mathmodule.c', '_math.c'], depends=['_math.h'], libraries=math_libs) ) + + # time libraries: librt may be needed for clock_gettime() + time_libs = [] + lib = sysconfig.get_config_var('TIMEMODULE_LIB') + if lib: + time_libs.append(lib) + # time operations and variables exts.append( Extension('time', ['timemodule.c', '_time.c'], - libraries=math_libs) ) - exts.append( Extension('_datetime', ['_datetimemodule.c', '_time.c'], - libraries=math_libs) ) + libraries=time_libs) ) + exts.append( Extension('_datetime', ['_datetimemodule.c', '_time.c']) ) # random number generator implemented in C exts.append( Extension("_random", ["_randommodule.c"]) ) # bisect |