Co-authored-by: Benjamin Peterson <benjamin@python.org>
.. versionadded:: 3.7
+.. data:: CLOCK_TAI
+
+ `International Atomic Time <https://www.nist.gov/pml/time-and-frequency-division/nist-time-frequently-asked-questions-faq#tai>`_
+
+ The system must have a current leap second table in order for this to give
+ the correct answer. PTP or NTP software can maintain a leap second table.
+
+ .. availability:: Linux.
+
+ .. versionadded:: 3.9
.. data:: CLOCK_THREAD_CPUTIME_ID
.. versionadded:: 3.8
-
The following constant is the only parameter that can be sent to
:func:`clock_settime`.
--- /dev/null
+Add :data:`time.CLOCK_TAI` constant if the operating system support it.
return -1;
}
#endif
+#ifdef CLOCK_TAI
+ if (PyModule_AddIntMacro(module, CLOCK_TAI) < 0) {
+ return -1;
+ }
+#endif
#ifdef CLOCK_UPTIME
if (PyModule_AddIntMacro(module, CLOCK_UPTIME) < 0) {
return -1;