gst-libav1: update to 1.24.11
[oi-userland.git] / components / python / python37 / patches / 21-thread-cpu-time.patch
blobd6d5e1a7503346995103594798e48beb2c8582b7
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
10 return 0;
13 +#elif defined(__sun) && defined(__SVR4)
14 +#define HAVE_THREAD_TIME
15 +static int
16 +_PyTime_GetThreadTimeWithInfo(_PyTime_t *tp, _Py_clock_info_t *info)
18 + _PyTime_t t;
20 + if (info) {
21 + info->implementation = "gethrvtime()";
22 + info->resolution = 1e-9;
23 + info->monotonic = 1;
24 + info->adjustable = 0;
25 + }
27 + t = _PyTime_FromNanoseconds(gethrvtime());
28 + *tp = t;
29 + return 0;
32 #elif defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID)
33 #define HAVE_THREAD_TIME
34 static int