summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-11-02 11:19:19 (GMT)
committerGitHub <noreply@github.com>2017-11-02 11:19:19 (GMT)
commita64ce973a3ad90e4f4a93c402e946c132f647a63 (patch)
tree89e9ad3e6009d34d4891635b01c59acbaf76bc1d /Modules/timemodule.c
parente8b19656396381407ad91473af5da8b0d4346e88 (diff)
downloadcpython-a64ce973a3ad90e4f4a93c402e946c132f647a63.zip
cpython-a64ce973a3ad90e4f4a93c402e946c132f647a63.tar.gz
cpython-a64ce973a3ad90e4f4a93c402e946c132f647a63.tar.bz2
bpo-31917: Add 3 new clock identifiers (#4207)
Add new clock identfiers: * time.CLOCK_BOOTTIME * time.CLOCK_PROF * time.CLOCK_UPTIME
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r--Modules/timemodule.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index b5e168f..347c828 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -1389,6 +1389,15 @@ PyInit_time(void)
#ifdef CLOCK_THREAD_CPUTIME_ID
PyModule_AddIntMacro(m, CLOCK_THREAD_CPUTIME_ID);
#endif
+#ifdef CLOCK_PROF
+ PyModule_AddIntMacro(m, CLOCK_PROF);
+#endif
+#ifdef CLOCK_BOOTTIME
+ PyModule_AddIntMacro(m, CLOCK_BOOTTIME);
+#endif
+#ifdef CLOCK_UPTIME
+ PyModule_AddIntMacro(m, CLOCK_UPTIME);
+#endif
if (!initialized) {
if (PyStructSequence_InitType2(&StructTimeType,