]> granicus.if.org Git - python/commit
time.time() now uses clock_gettime(CLOCK_REALTIME) if available
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 28 Mar 2012 00:54:15 +0000 (02:54 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 28 Mar 2012 00:54:15 +0000 (02:54 +0200)
commitad95c2d25c5fe5c4c88b73de2c60722ba56572e9
tree91d69b740b60b5d393e303cac839b3e506e5431e
parent74eb6c0e8bcdab65ac10f5a0a880768eef15a601
time.time() now uses clock_gettime(CLOCK_REALTIME) if available

clock_gettime(CLOCK_REALTIME) has a better resolution than gettimeofday().
time.time() falls back on gettimeofday() (and then on other functions) on
error.
Modules/timemodule.c