PEP 564: Minor fixes, fix typos
This commit is contained in:
parent
fcbf6126d3
commit
86c06a737c
14
pep-0564.rst
14
pep-0564.rst
|
@ -169,7 +169,7 @@ but use nanoseconds as Python ``int``.
|
||||||
For example, ``time.monotonic_ns() == int(time.monotonic() * 1e9)`` if
|
For example, ``time.monotonic_ns() == int(time.monotonic() * 1e9)`` if
|
||||||
``monotonic()`` value is small enough to not lose precision.
|
``monotonic()`` value is small enough to not lose precision.
|
||||||
|
|
||||||
These functions are needed because they handle big timestamps, like
|
These functions are needed because they handle large timestamps, like
|
||||||
time.time() which uses the UNIX epoch as reference, and so their version
|
time.time() which uses the UNIX epoch as reference, and so their version
|
||||||
without the ``_ns`` suffix are likely to lose precision at the
|
without the ``_ns`` suffix are likely to lose precision at the
|
||||||
nanosecond resolution.
|
nanosecond resolution.
|
||||||
|
@ -182,8 +182,8 @@ Since the ``time.clock()`` function was deprecated in Python 3.3, no
|
||||||
|
|
||||||
Python has other functions handling time. No nanosecond variant was
|
Python has other functions handling time. No nanosecond variant was
|
||||||
proposed because their internal resolution is greater or equal to 1 us,
|
proposed because their internal resolution is greater or equal to 1 us,
|
||||||
or because their maximum value is a small enough to lose precision. For
|
or because their maximum value is a small enough to not lose precision.
|
||||||
example, the maximum value of ``clock_getres()`` is likely to be 1
|
For example, the maximum value of ``clock_getres()`` should be 1
|
||||||
second.
|
second.
|
||||||
|
|
||||||
Example of unchanged functions:
|
Example of unchanged functions:
|
||||||
|
@ -200,8 +200,8 @@ Example of unchanged functions:
|
||||||
|
|
||||||
See also the `Annex: Clocks Resolution in Python`_.
|
See also the `Annex: Clocks Resolution in Python`_.
|
||||||
|
|
||||||
New nanosecond flavor of these functions may be added later if an
|
A new nanosecond flavor of these functions may be added later if an
|
||||||
operating system adds a new function provided better resolution.
|
operating system adds a new function providing better resolution.
|
||||||
|
|
||||||
|
|
||||||
Alternatives and discussion
|
Alternatives and discussion
|
||||||
|
@ -354,7 +354,7 @@ Example of script ot measure the smallest difference between two
|
||||||
Linux
|
Linux
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Linux (kernel 4.12 on Fedora 26):
|
Clocks resolution measured in Python on Fedora 26 (kernel 4.12):
|
||||||
|
|
||||||
==================== ==========
|
==================== ==========
|
||||||
Function Resolution
|
Function Resolution
|
||||||
|
@ -387,7 +387,7 @@ Notes on resolutions:
|
||||||
Windows
|
Windows
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Windows 8.1:
|
Clocks resolution measured in Python on Windows 8.1:
|
||||||
|
|
||||||
================= =============
|
================= =============
|
||||||
Function Resolution
|
Function Resolution
|
||||||
|
|
Loading…
Reference in New Issue