We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ea4939 commit cd5bfa1Copy full SHA for cd5bfa1
tests/checkasm/checkasm.h
@@ -208,7 +208,11 @@ static inline uint64_t readtime(void) {
208
#include <time.h>
209
static inline uint64_t clock_gettime_nsec(void) {
210
struct timespec ts;
211
+#ifdef CLOCK_MONOTONIC_RAW
212
clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
213
+#else
214
+ clock_gettime(CLOCK_MONOTONIC, &ts);
215
+#endif
216
return ((uint64_t)ts.tv_sec*1000000000u) + (uint64_t)ts.tv_nsec;
217
}
218
#define readtime clock_gettime_nsec
0 commit comments