Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(127)

Delta Between Two Patch Sets: Doc/library/time.rst

Issue 22043: Use a monotonic clock to compute timeouts
Left Patch Set: Created 3 years, 1 month ago
Right Patch Set: Created 3 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Include/pytime.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 :mod:`time` --- Time access and conversions 1 :mod:`time` --- Time access and conversions
2 =========================================== 2 ===========================================
3 3
4 .. module:: time 4 .. module:: time
5 :synopsis: Time access and conversions. 5 :synopsis: Time access and conversions.
6 6
7 7
8 This module provides various time-related functions. For related 8 This module provides various time-related functions. For related
9 functionality, see also the :mod:`datetime` and :mod:`calendar` modules. 9 functionality, see also the :mod:`datetime` and :mod:`calendar` modules.
10 10
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 difference between the results of consecutive calls is valid. 308 difference between the results of consecutive calls is valid.
309 309
310 On Windows versions older than Vista, :func:`monotonic` detects 310 On Windows versions older than Vista, :func:`monotonic` detects
311 :c:func:`GetTickCount` integer overflow (32 bits, roll-over after 49.7 days). 311 :c:func:`GetTickCount` integer overflow (32 bits, roll-over after 49.7 days).
312 It increases an internal epoch (reference time) by 2\ :sup:`32` each time 312 It increases an internal epoch (reference time) by 2\ :sup:`32` each time
313 that an overflow is detected. The epoch is stored in the process-local state 313 that an overflow is detected. The epoch is stored in the process-local state
314 and so the value of :func:`monotonic` may be different in two Python 314 and so the value of :func:`monotonic` may be different in two Python
315 processes running for more than 49 days. On more recent versions of Windows 315 processes running for more than 49 days. On more recent versions of Windows
316 and on other operating systems, :func:`monotonic` is system-wide. 316 and on other operating systems, :func:`monotonic` is system-wide.
317 317
318 Availability: Windows, Mac OS X, Linux, FreeBSD, OpenBSD, Solaris. 318 .. versionadded:: 3.3
319 319 .. versionchanged:: 3.5
320 .. versionadded:: 3.3 320 The function is now always available.
321 321
322 322
323 .. function:: perf_counter() 323 .. function:: perf_counter()
324 324
325 Return the value (in fractional seconds) of a performance counter, i.e. a 325 Return the value (in fractional seconds) of a performance counter, i.e. a
326 clock with the highest available resolution to measure a short duration. It 326 clock with the highest available resolution to measure a short duration. It
327 does include time elapsed during sleep and is system-wide. The reference 327 does include time elapsed during sleep and is system-wide. The reference
328 point of the returned value is undefined, so that only the difference between 328 point of the returned value is undefined, so that only the difference between
329 the results of consecutive calls is valid. 329 the results of consecutive calls is valid.
330 330
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 682
683 .. rubric:: Footnotes 683 .. rubric:: Footnotes
684 684
685 .. [#] The use of ``%Z`` is now deprecated, but the ``%z`` escape that expands t o the 685 .. [#] The use of ``%Z`` is now deprecated, but the ``%z`` escape that expands t o the
686 preferred hour/minute offset is not supported by all ANSI C libraries. Also, a 686 preferred hour/minute offset is not supported by all ANSI C libraries. Also, a
687 strict reading of the original 1982 :rfc:`822` standard calls for a two-digit 687 strict reading of the original 1982 :rfc:`822` standard calls for a two-digit
688 year (%y rather than %Y), but practice moved to 4-digit years long before the 688 year (%y rather than %Y), but practice moved to 4-digit years long before the
689 year 2000. After that, :rfc:`822` became obsolete and the 4-digit year has 689 year 2000. After that, :rfc:`822` became obsolete and the 4-digit year has
690 been first recommended by :rfc:`1123` and then mandated by :rfc:`2822`. 690 been first recommended by :rfc:`1123` and then mandated by :rfc:`2822`.
691 691
LEFTRIGHT
« no previous file | Include/pytime.h » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7