[issue10278] add time.wallclock() method

STINNER Victor report at bugs.python.org
Sun Jan 8 19:18:53 CET 2012


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> on linux the underlying functionality is implemented in librt; the extension doesn't check for this or links with -lrt.

The changeset 35e4b7c4bafa changed configure.in to check clock_gettime(). It checks without and with librt:

     7.7 +AC_CHECK_FUNCS(clock_gettime, [], [
     7.8 +    AC_CHECK_LIB(rt, clock_gettime, [
     7.9 +        AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
    7.10 +        AC_DEFINE(TIMEMODULE_LIB, [rt],
    7.11 +                  [Library needed by timemodule.c: librt may be needed for clock_gettime()])
    7.12 +    ])
    7.13 +])

wallclock-3.patch checks for HAVE_CLOCK_GETTIME, which does use librt in its test (see above).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10278>
_______________________________________


More information about the Python-bugs-list mailing list