[System][z/OS] Fix per-thread timing error on z/OS (#76947)
This patch calls ProcessCPUUsage() for z/OS because we do not support CLOCK_THREAD_CPUTIME_ID. This copies the change made to google benchmark here
e3824e7503
This commit is contained in:
parent
86127305d4
commit
70e67253d6
3
third-party/benchmark/src/timers.cc
vendored
3
third-party/benchmark/src/timers.cc
vendored
@ -168,6 +168,9 @@ double ThreadCPUUsage() {
|
||||
// RTEMS doesn't support CLOCK_THREAD_CPUTIME_ID. See
|
||||
// https://github.com/RTEMS/rtems/blob/master/cpukit/posix/src/clockgettime.c
|
||||
return ProcessCPUUsage();
|
||||
#elif defined(BENCHMARK_OS_ZOS)
|
||||
// z/OS doesn't support CLOCK_THREAD_CPUTIME_ID.
|
||||
return ProcessCPUUsage();
|
||||
#elif defined(BENCHMARK_OS_SOLARIS)
|
||||
struct rusage ru;
|
||||
if (getrusage(RUSAGE_LWP, &ru) == 0) return MakeTime(ru);
|
||||
|
Loading…
x
Reference in New Issue
Block a user