diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-03-15 00:17:09 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-03-15 00:17:09 (GMT) |
commit | 071eca3f5c55f127f754bd5575123ec94d8c3eaa (patch) | |
tree | 820545a3dba69517d6b034d9f3a0ecc48b591237 /Doc | |
parent | ec919cc74d48cac88ff15ee31084f2eab9add417 (diff) | |
download | cpython-071eca3f5c55f127f754bd5575123ec94d8c3eaa.zip cpython-071eca3f5c55f127f754bd5575123ec94d8c3eaa.tar.gz cpython-071eca3f5c55f127f754bd5575123ec94d8c3eaa.tar.bz2 |
Issue #10278: Add an optional strict argument to time.steady(), False by default
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/time.rst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/time.rst b/Doc/library/time.rst index 63d45fd..fcee551 100644 --- a/Doc/library/time.rst +++ b/Doc/library/time.rst @@ -226,7 +226,7 @@ The module defines the following functions and data items: The earliest date for which it can generate a time is platform-dependent. -.. function:: steady() +.. function:: steady(strict=False) .. index:: single: benchmarking @@ -236,6 +236,11 @@ The module defines the following functions and data items: adjusted. The reference point of the returned value is undefined so only the difference of consecutive calls is valid. + If available, a monotonic clock is used. By default, if *strict* is False, + the function falls back to another clock if the monotonic clock failed or is + not available. If *strict* is True, raise an :exc:`OSError` on error or + :exc:`NotImplementedError` if no monotonic clock is available. + .. versionadded:: 3.3 |