New submission from STINNER Victor <victor.stin...@haypocalc.com>: Python implements time.time() using gettimeofday() which has only a resolution of 1 microsecond because it uses the timeval structure which is only able to store microseconds.
Attached patch changes _PyTime_gettimeofday() to make it uses the timespec structure (which has a resolution has 1 nanosecond) and use GetSystemTimeAsFileTime() on Windows. So time.time() has a theorical resolution 10 times better than currently. ---------- files: timespec.patch keywords: patch messages: 151865 nosy: belopolsky, haypo priority: normal severity: normal status: open title: Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows versions: Python 3.3 Added file: http://bugs.python.org/file24305/timespec.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13845> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com