1 This patch fixes (adds) behavior of thread_time is Solaris which doesn't
2 support clock_gettime(CLOCK_THREAD_CPUTIME_ID) method.
4 This was submitted upstream:
5 https://bugs.python.org/issue35455
7 --- Python-3.7.3/Modules/timemodule.c
8 +++ Python-3.7.3/Modules/timemodule.c
9 @@ -1325,6 +1325,25 @@ _PyTime_GetThreadTimeWithInfo(_PyTime_t
13 +#elif defined(__sun) && defined(__SVR4)
14 +#define HAVE_THREAD_TIME
16 +_PyTime_GetThreadTimeWithInfo(_PyTime_t *tp, _Py_clock_info_t *info)
21 + info->implementation = "gethrvtime()";
22 + info->resolution = 1e-9;
23 + info->monotonic = 1;
24 + info->adjustable = 0;
27 + t = _PyTime_FromNanoseconds(gethrvtime());
32 #elif defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID)
33 #define HAVE_THREAD_TIME