PEP 410: os.stat() nanosecond existed since at least Python 2.6

This commit is contained in:
Victor Stinner 2012-02-17 02:24:58 +01:00
parent 76e6380050
commit 23158b0d6c
1 changed files with 5 additions and 2 deletions

View File

@ -25,8 +25,11 @@ Python 2.3 introduced float timestamps to support subsecond resolutions.
os.stat() uses float timestamps by default since Python 2.5. Python 3.3
introduced functions supporting nanosecond resolutions:
* os module: stat(), utimensat(), futimens()
* time module: clock_gettime(), clock_getres(), wallclock()
* os module: futimens(), utimensat()
* time module: clock_gettime(), clock_getres(), monotonic(), wallclock()
os.stat() reads nanoseconds fields of the stat structure, but returns
timestamps as float.
The Python float type uses binary64 format of the IEEE 754 standard. With a
resolution of 1 nanosecond (10\ :sup:`-9`), float timestamps lose precision for values