]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[docs] Use full names for time units (GH-28611)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 29 Sep 2021 09:09:56 +0000 (12:09 +0300)
committerGitHub <noreply@github.com>
Wed, 29 Sep 2021 09:09:56 +0000 (12:09 +0300)
Use "second", "millisecond", "microsecond", "nanosecond" instead of
"sec", "ms", "msec", "us", "ns", etc.

13 files changed:
Doc/library/asyncio-dev.rst
Doc/library/asyncio-platforms.rst
Doc/library/curses.rst
Doc/library/multiprocessing.rst
Doc/library/time.rst
Doc/library/timeit.rst
Doc/whatsnew/3.11.rst
Doc/whatsnew/3.9.rst
Misc/NEWS.d/3.10.0a4.rst
Misc/NEWS.d/3.7.0a4.rst
Misc/NEWS.d/3.9.0b1.rst
Misc/NEWS.d/next/Library/2021-09-20-22-46-40.bpo-21302.h56430.rst
Misc/NEWS.d/next/Windows/2021-06-06-16-36-13.bpo-41299.Rg-vb_.rst

index 02a00033152aba764c3ad04daa55ed87493b7199..77f1128de50c955122e7821cf81c6bfe7f0a4b8a 100644 (file)
@@ -57,7 +57,7 @@ When the debug mode is enabled:
 * The execution time of the I/O selector is logged if it takes too long to
   perform an I/O operation.
 
-* Callbacks taking longer than 100ms are logged.  The
+* Callbacks taking longer than 100 milliseconds are logged.  The
   :attr:`loop.slow_callback_duration` attribute can be used to set the
   minimum execution duration in seconds that is considered "slow".
 
index 390ee1969d096f4109a6e127b9c0cc1714ac285c..50ad8a2ab70324a275aabc145cbc899962c2a28f 100644 (file)
@@ -63,7 +63,7 @@ All event loops on Windows do not support the following methods:
   methods are not supported.
 
 The resolution of the monotonic clock on Windows is usually around 15.6
-msec.  The best resolution is 0.5 msec. The resolution depends on the
+milliseconds.  The best resolution is 0.5 milliseconds. The resolution depends on the
 hardware (availability of `HPET
 <https://en.wikipedia.org/wiki/High_Precision_Event_Timer>`_) and on the
 Windows configuration.
index efbece437af2dd591011e13301b98c4f131728fb..37e822c0e2b2079effc91746d5dbde94b1054203 100644 (file)
@@ -368,7 +368,7 @@ The module :mod:`curses` defines the following functions:
 
    Set the maximum time in milliseconds that can elapse between press and release
    events in order for them to be recognized as a click, and return the previous
-   interval value.  The default value is 200 msec, or one fifth of a second.
+   interval value.  The default value is 200 milliseconds, or one fifth of a second.
 
 
 .. function:: mousemask(mousemask)
index c5d07dc5954842837977206431bdf14e2b207008..f3d725b822529ea031afca8b13ac3c189cab65ca 100644 (file)
@@ -412,7 +412,7 @@ For example::
            multiple_results = [pool.apply_async(os.getpid, ()) for i in range(4)]
            print([res.get(timeout=1) for res in multiple_results])
 
-           # make a single worker sleep for 10 secs
+           # make a single worker sleep for 10 seconds
            res = pool.apply_async(time.sleep, (10,))
            try:
                print(res.get(timeout=1))
index 69e5274f1cee7404dd3e73deafe564b1175e864a..0f880910c6ee680e1f95afbb79c48fa3cc14aa73 100644 (file)
@@ -366,11 +366,11 @@ Functions
 
    Unix implementation:
 
-   * Use ``clock_nanosleep()`` if available (resolution: 1 ns);
-   * Or use ``nanosleep()`` if available (resolution: 1 ns);
-   * Or use ``select()`` (resolution: 1 us).
+   * Use ``clock_nanosleep()`` if available (resolution: 1 nanosecond);
+   * Or use ``nanosleep()`` if available (resolution: 1 nanosecond);
+   * Or use ``select()`` (resolution: 1 microsecond).
 
-   On Windows, a waitable timer is used (resolution: 100 ns). If *secs* is
+   On Windows, a waitable timer is used (resolution: 100 nanosecond). If *secs* is
    zero, ``Sleep(0)`` is used.
 
    .. versionchanged:: 3.11
index d4e8b749db48087324851aff0cb476a391b3d98d..7f1c41d46399ed2c6ac48cf735dc1548e64b0e55 100644 (file)
@@ -233,7 +233,7 @@ Where the following options are understood:
 
 .. cmdoption:: -u, --unit=U
 
-   specify a time unit for timer output; can select nsec, usec, msec, or sec
+   specify a time unit for timer output; can select ``nsec``, ``usec``, ``msec``, or ``sec``
 
    .. versionadded:: 3.5
 
index 484aad7d657628821230355238fe73631584085b..d01d2e263199adc4fe0bdfc0f0b2fc64fd6b4b24 100644 (file)
@@ -243,14 +243,14 @@ time
 ----
 
 * On Unix, :func:`time.sleep` now uses the ``clock_nanosleep()`` or
-  ``nanosleep()`` function, if available, which has a resolution of 1 ns
-  (10\ :sup:`-9` sec), rather than using ``select()`` which has a resolution
-  of 1 us (10\ :sup:`-6` sec).
+  ``nanosleep()`` function, if available, which has a resolution of 1 nanosecond
+  (10\ :sup:`-9` seconds), rather than using ``select()`` which has a resolution
+  of 1 microsecond (10\ :sup:`-6` seconds).
   (Contributed by Livius and Victor Stinner in :issue:`21302`.)
 
 * On Windows, :func:`time.sleep` now uses a waitable timer which has a
-  resolution of 100 ns (10\ :sup:`-7` sec). Previously, it had a solution of 1 ms
-  (10\ :sup:`-3` sec).
+  resolution of 100 nanoseconds (10\ :sup:`-7` seconds). Previously, it had
+  a resolution of 1 millisecond (10\ :sup:`-3` seconds).
   (Contributed by Livius and Victor Stinner in :issue:`21302`.)
 
 unicodedata
index f1725e7df022045a56f8ec42df718b174375d0f1..941fae5fb87813a805106574e2b5a9e0a35423d8 100644 (file)
@@ -671,7 +671,7 @@ time
 
 On AIX, :func:`~time.thread_time` is now implemented with ``thread_cputime()``
 which has nanosecond resolution, rather than
-``clock_gettime(CLOCK_THREAD_CPUTIME_ID)`` which has a resolution of 10 ms.
+``clock_gettime(CLOCK_THREAD_CPUTIME_ID)`` which has a resolution of 10 milliseconds.
 (Contributed by Batuhan Taskaya in :issue:`40192`)
 
 sys
index 57da9254587b44c3112d20dd3c61e262eba26d59..ff16a7037277c737c6920d20bdc4cd01bf445e48 100644 (file)
@@ -786,7 +786,7 @@ Skip some asyncio tests on VxWorks.
 .. nonce: uzwlF_
 .. section: Tests
 
-Enhance ``test_select.test_select()``: it now takes 500 ms rather than 10
+Enhance ``test_select.test_select()``: it now takes 500 milliseconds rather than 10
 seconds. Use Python rather than a shell to make the test more portable.
 
 ..
index af9cf4d29f902f3eeec3728378f8390c531eb5ac..f19d1a1823584b5dc24f12ca428e688f69804210 100644 (file)
@@ -473,7 +473,7 @@ match.
 .. nonce: uxVOpk
 .. section: Library
 
-Abort asyncio SSLProtocol connection if handshake not complete within 10s
+Abort asyncio SSLProtocol connection if handshake not complete within 10 seconds.
 
 ..
 
index 51dc9ce0ec0377aecffcc887afd0f94a428cba91..529be0eba586acb352571ac42a7d2216a573f5f3 100644 (file)
@@ -641,7 +641,7 @@ than alphabetical.
 
 On AIX, :func:`~time.thread_time` is now implemented with
 ``thread_cputime()`` which has nanosecond resolution, rather than
-``clock_gettime(CLOCK_THREAD_CPUTIME_ID)`` which has a resolution of 10 ms.
+``clock_gettime(CLOCK_THREAD_CPUTIME_ID)`` which has a resolution of 10 milliseconds.
 Patch by Batuhan Taskaya.
 
 ..
index 1746d56f41b4c0eb9da64e7c83b743ac0fbee015..07f18d4a9074a0f59514161ad1cfe56c3a5832c3 100644 (file)
@@ -1,3 +1,4 @@
 On Windows, :func:`time.sleep` now uses a waitable timer which has a resolution
-of 100 ns (10\ :sup:`-7` sec). Previously, it had a solution of 1 ms (10\ :sup:`-3` sec).
+of 100 nanoseconds (10\ :sup:`-7` seconds). Previously, it had a resolution of
+1 millisecond (10\ :sup:`-3` seconds).
 Patch by Livius and Victor Stinner.
index 71f700ffa1553e27f606d7032a150abf01b647b9..1104882b1ba302e34de9710515eae986e67e260c 100644 (file)
@@ -1 +1 @@
-Fix 16ms jitter when using timeouts in :mod:`threading`, such as with :meth:`threading.Lock.acquire` or :meth:`threading.Condition.wait`.
+Fix 16 milliseconds jitter when using timeouts in :mod:`threading`, such as with :meth:`threading.Lock.acquire` or :meth:`threading.Condition.wait`.