STINNER Victor added the comment:

Oh, I forgot to mention that the patch of the issue #22043 also changes 
_PyTimeSpec_get_time() to use clock_gettime(CLOCK_REALTIME) which has a 
resolution of 1 nanosecond.

_PyTimeSpec_get_time() already uses GetSystemTimeAsFileTime() which has a 
resolution of 100 nanosecond. See also the issue #19007 "precise time.time() 
under Windows 8: use GetSystemTimePreciseAsFileTime".

I'm talking about the resolution of the C structure. The effive resolution can 
be much worse than that. For example, the resolution measured in Python of 
clock_gettime(CLOCK_REALTIME) is closer to 160 nanoseconds (on my laptop) than 
1 nanoescond. See the "Python Resolution" column the second table of:
http://legacy.python.org/dev/peps/pep-0418/#system-time

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22117>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to