diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2022-04-28 07:39:29 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-04-28 08:28:54 +0000 |
commit | 5b17ba836945f2b7cbcc77a643311f41fe7b7b6e (patch) | |
tree | 11aa849763d123d755eb0d9c30215904acdef4c2 /src/mongo/db/operation_cpu_timer.cpp | |
parent | 30260c79d9e09dee6c68637f87db6c4bdf16cbfe (diff) | |
download | mongo-5b17ba836945f2b7cbcc77a643311f41fe7b7b6e.tar.gz |
SERVER-41353 replace errnoWithDescription with an API based on std::error_code
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); } |