File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -774,6 +774,16 @@ These constants are used as parameters for :func:`clock_getres` and
774774
775775 .. versionadded :: 3.7
776776
777+ .. data :: CLOCK_TAI
778+
779+ `International Atomic Time <https://www.nist.gov/pml/time-and-frequency-division/nist-time-frequently-asked-questions-faq#tai >`_
780+
781+ The system must have a current leap second table in order for this to give
782+ the correct answer. PTP or NTP software can maintain a leap second table.
783+
784+ .. availability :: Linux.
785+
786+ .. versionadded :: 3.9
777787
778788.. data :: CLOCK_THREAD_CPUTIME_ID
779789
@@ -805,7 +815,6 @@ These constants are used as parameters for :func:`clock_getres` and
805815
806816 .. versionadded :: 3.8
807817
808-
809818The following constant is the only parameter that can be sent to
810819:func: `clock_settime `.
811820
Original file line number Diff line number Diff line change 1+ Add :data: `time.CLOCK_TAI ` constant if the operating system support it.
Original file line number Diff line number Diff line change @@ -1786,6 +1786,11 @@ time_exec(PyObject *module)
17861786 return -1 ;
17871787 }
17881788#endif
1789+ #ifdef CLOCK_TAI
1790+ if (PyModule_AddIntMacro (module , CLOCK_TAI ) < 0 ) {
1791+ return -1 ;
1792+ }
1793+ #endif
17891794#ifdef CLOCK_UPTIME
17901795 if (PyModule_AddIntMacro (module , CLOCK_UPTIME ) < 0 ) {
17911796 return -1 ;
You can’t perform that action at this time.
0 commit comments