mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Add time.CLOCK_HIGHRES constant, needed on Solaris
This commit is contained in:
parent
4ee2a8a127
commit
1470f35bc6
2 changed files with 12 additions and 0 deletions
|
@ -159,6 +159,15 @@ The module defines the following functions and data items:
|
|||
.. versionadded:: 3.3
|
||||
|
||||
|
||||
.. data:: CLOCK_HIGHRES
|
||||
|
||||
The Solaris OS has a CLOCK_HIGHRES timer that attempts to use an optimal
|
||||
hardware source, and may give close to nanosecond resolution. CLOCK_HIGHRES
|
||||
is the nonadjustable, high-resolution clock.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
|
||||
.. data:: CLOCK_MONOTONIC
|
||||
|
||||
Clock that cannot be set and represents monotonic time since some
|
||||
|
|
|
@ -962,6 +962,9 @@ PyInit_timezone(PyObject *m) {
|
|||
#ifdef CLOCK_MONOTONIC_RAW
|
||||
PyModule_AddIntMacro(m, CLOCK_MONOTONIC_RAW);
|
||||
#endif
|
||||
#ifdef CLOCK_HIGHRES
|
||||
PyModule_AddIntMacro(m, CLOCK_HIGHRES);
|
||||
#endif
|
||||
#ifdef CLOCK_PROCESS_CPUTIME_ID
|
||||
PyModule_AddIntMacro(m, CLOCK_PROCESS_CPUTIME_ID);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue