mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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
This commit is contained in:
parent
92b958420e
commit
e0be423297
9 changed files with 615 additions and 288 deletions
12
setup.py
12
setup.py
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue