Skip to content

Commit 233b9da

Browse files
[docs] Use full names for time units (GH-28611)
Use "second", "millisecond", "microsecond", "nanosecond" instead of "sec", "ms", "msec", "us", "ns", etc.
1 parent e046aab commit 233b9da

13 files changed

+21
-20
lines changed

Doc/library/asyncio-dev.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ When the debug mode is enabled:
5757
* The execution time of the I/O selector is logged if it takes too long to
5858
perform an I/O operation.
5959

60-
* Callbacks taking longer than 100ms are logged. The
60+
* Callbacks taking longer than 100 milliseconds are logged. The
6161
:attr:`loop.slow_callback_duration` attribute can be used to set the
6262
minimum execution duration in seconds that is considered "slow".
6363

Doc/library/asyncio-platforms.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ All event loops on Windows do not support the following methods:
6363
methods are not supported.
6464

6565
The resolution of the monotonic clock on Windows is usually around 15.6
66-
msec. The best resolution is 0.5 msec. The resolution depends on the
66+
milliseconds. The best resolution is 0.5 milliseconds. The resolution depends on the
6767
hardware (availability of `HPET
6868
<https://en.wikipedia.org/wiki/High_Precision_Event_Timer>`_) and on the
6969
Windows configuration.

Doc/library/curses.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ The module :mod:`curses` defines the following functions:
368368

369369
Set the maximum time in milliseconds that can elapse between press and release
370370
events in order for them to be recognized as a click, and return the previous
371-
interval value. The default value is 200 msec, or one fifth of a second.
371+
interval value. The default value is 200 milliseconds, or one fifth of a second.
372372

373373

374374
.. function:: mousemask(mousemask)

Doc/library/multiprocessing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ For example::
412412
multiple_results = [pool.apply_async(os.getpid, ()) for i in range(4)]
413413
print([res.get(timeout=1) for res in multiple_results])
414414

415-
# make a single worker sleep for 10 secs
415+
# make a single worker sleep for 10 seconds
416416
res = pool.apply_async(time.sleep, (10,))
417417
try:
418418
print(res.get(timeout=1))

Doc/library/time.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,11 @@ Functions
366366

367367
Unix implementation:
368368

369-
* Use ``clock_nanosleep()`` if available (resolution: 1 ns);
370-
* Or use ``nanosleep()`` if available (resolution: 1 ns);
371-
* Or use ``select()`` (resolution: 1 us).
369+
* Use ``clock_nanosleep()`` if available (resolution: 1 nanosecond);
370+
* Or use ``nanosleep()`` if available (resolution: 1 nanosecond);
371+
* Or use ``select()`` (resolution: 1 microsecond).
372372

373-
On Windows, a waitable timer is used (resolution: 100 ns). If *secs* is
373+
On Windows, a waitable timer is used (resolution: 100 nanosecond). If *secs* is
374374
zero, ``Sleep(0)`` is used.
375375

376376
.. versionchanged:: 3.11

Doc/library/timeit.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Where the following options are understood:
233233

234234
.. cmdoption:: -u, --unit=U
235235

236-
specify a time unit for timer output; can select nsec, usec, msec, or sec
236+
specify a time unit for timer output; can select ``nsec``, ``usec``, ``msec``, or ``sec``
237237

238238
.. versionadded:: 3.5
239239

Doc/whatsnew/3.11.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,14 @@ time
243243
----
244244

245245
* On Unix, :func:`time.sleep` now uses the ``clock_nanosleep()`` or
246-
``nanosleep()`` function, if available, which has a resolution of 1 ns
247-
(10\ :sup:`-9` sec), rather than using ``select()`` which has a resolution
248-
of 1 us (10\ :sup:`-6` sec).
246+
``nanosleep()`` function, if available, which has a resolution of 1 nanosecond
247+
(10\ :sup:`-9` seconds), rather than using ``select()`` which has a resolution
248+
of 1 microsecond (10\ :sup:`-6` seconds).
249249
(Contributed by Livius and Victor Stinner in :issue:`21302`.)
250250

251251
* On Windows, :func:`time.sleep` now uses a waitable timer which has a
252-
resolution of 100 ns (10\ :sup:`-7` sec). Previously, it had a solution of 1 ms
253-
(10\ :sup:`-3` sec).
252+
resolution of 100 nanoseconds (10\ :sup:`-7` seconds). Previously, it had
253+
a resolution of 1 millisecond (10\ :sup:`-3` seconds).
254254
(Contributed by Livius and Victor Stinner in :issue:`21302`.)
255255

256256
unicodedata

Doc/whatsnew/3.9.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ time
671671

672672
On AIX, :func:`~time.thread_time` is now implemented with ``thread_cputime()``
673673
which has nanosecond resolution, rather than
674-
``clock_gettime(CLOCK_THREAD_CPUTIME_ID)`` which has a resolution of 10 ms.
674+
``clock_gettime(CLOCK_THREAD_CPUTIME_ID)`` which has a resolution of 10 milliseconds.
675675
(Contributed by Batuhan Taskaya in :issue:`40192`)
676676

677677
sys

Misc/NEWS.d/3.10.0a4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ Skip some asyncio tests on VxWorks.
786786
.. nonce: uzwlF_
787787
.. section: Tests
788788
789-
Enhance ``test_select.test_select()``: it now takes 500 ms rather than 10
789+
Enhance ``test_select.test_select()``: it now takes 500 milliseconds rather than 10
790790
seconds. Use Python rather than a shell to make the test more portable.
791791

792792
..

Misc/NEWS.d/3.7.0a4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ match.
473473
.. nonce: uxVOpk
474474
.. section: Library
475475
476-
Abort asyncio SSLProtocol connection if handshake not complete within 10s
476+
Abort asyncio SSLProtocol connection if handshake not complete within 10 seconds.
477477

478478
..
479479

Misc/NEWS.d/3.9.0b1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ than alphabetical.
641641
642642
On AIX, :func:`~time.thread_time` is now implemented with
643643
``thread_cputime()`` which has nanosecond resolution, rather than
644-
``clock_gettime(CLOCK_THREAD_CPUTIME_ID)`` which has a resolution of 10 ms.
644+
``clock_gettime(CLOCK_THREAD_CPUTIME_ID)`` which has a resolution of 10 milliseconds.
645645
Patch by Batuhan Taskaya.
646646

647647
..
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
On Windows, :func:`time.sleep` now uses a waitable timer which has a resolution
2-
of 100 ns (10\ :sup:`-7` sec). Previously, it had a solution of 1 ms (10\ :sup:`-3` sec).
2+
of 100 nanoseconds (10\ :sup:`-7` seconds). Previously, it had a resolution of
3+
1 millisecond (10\ :sup:`-3` seconds).
34
Patch by Livius and Victor Stinner.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fix 16ms jitter when using timeouts in :mod:`threading`, such as with :meth:`threading.Lock.acquire` or :meth:`threading.Condition.wait`.
1+
Fix 16 milliseconds jitter when using timeouts in :mod:`threading`, such as with :meth:`threading.Lock.acquire` or :meth:`threading.Condition.wait`.

0 commit comments

Comments
 (0)