Skip to content

Commit

Permalink
fix per-thread timing error on z/OS
Browse files Browse the repository at this point in the history
  • Loading branch information
abhina-sree committed Dec 20, 2023
1 parent 6b7e86c commit 2de0ba4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/timers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,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);
Expand Down

0 comments on commit 2de0ba4

Please sign in to comment.