diff options
Diffstat (limited to 'src/mongo/db/operation_cpu_timer.cpp')
-rw-r--r-- | src/mongo/db/operation_cpu_timer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/operation_cpu_timer.cpp b/src/mongo/db/operation_cpu_timer.cpp index b870e621909..f37f0b99da4 100644 --- a/src/mongo/db/operation_cpu_timer.cpp +++ b/src/mongo/db/operation_cpu_timer.cpp @@ -59,9 +59,9 @@ namespace { Nanoseconds getThreadCPUTime() { struct timespec t; if (auto ret = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &t); ret != 0) { - int ec = errno; - iassert(Status(ErrorCodes::InternalError, - "Unable to get time: {}"_format(errnoWithDescription(ec)))); + auto ec = lastSystemError(); + iassert( + Status(ErrorCodes::InternalError, "Unable to get time: {}"_format(errorMessage(ec)))); } return Seconds(t.tv_sec) + Nanoseconds(t.tv_nsec); } |