mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-09 12:28:13 -04:00
chore(performance_monitor): assert clock_gettime() return value
This commit is contained in:
parent
f6e760bfad
commit
7dccf72342
@ -21,6 +21,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <cassert>
|
||||
#include <deque>
|
||||
#include <mutex>
|
||||
#include <string_view>
|
||||
@ -183,7 +184,8 @@ class performance_monitor_impl final : public performance_monitor {
|
||||
return ticks.QuadPart;
|
||||
#else
|
||||
struct timespec ts;
|
||||
::clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
|
||||
auto rv [[maybe_unused]] = ::clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
|
||||
assert(rv == 0);
|
||||
return UINT64_C(1'000'000'000) * ts.tv_sec + ts.tv_nsec;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user