File tree 3 files changed +16
-1
lines changed 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
774
774
775
775
.. versionadded :: 3.7
776
776
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
777
787
778
788
.. data :: CLOCK_THREAD_CPUTIME_ID
779
789
@@ -805,7 +815,6 @@ These constants are used as parameters for :func:`clock_getres` and
805
815
806
816
.. versionadded :: 3.8
807
817
808
-
809
818
The following constant is the only parameter that can be sent to
810
819
:func: `clock_settime `.
811
820
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)
1786
1786
return -1 ;
1787
1787
}
1788
1788
#endif
1789
+ #ifdef CLOCK_TAI
1790
+ if (PyModule_AddIntMacro (module , CLOCK_TAI ) < 0 ) {
1791
+ return -1 ;
1792
+ }
1793
+ #endif
1789
1794
#ifdef CLOCK_UPTIME
1790
1795
if (PyModule_AddIntMacro (module , CLOCK_UPTIME ) < 0 ) {
1791
1796
return -1 ;
You can’t perform that action at this time.
0 commit comments