Skip to content
Snippets Groups Projects
Commit f581ef94 authored by Matt Johnston's avatar Matt Johnston
Browse files

define CLOCK_MONOTONIC if needed

parent b65354d2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -634,6 +634,10 @@ reach userspace include headers */
#ifndef CLOCK_MONOTONIC_COARSE
#define CLOCK_MONOTONIC_COARSE 6
#endif
/* Some old toolchains know SYS_clock_gettime but not CLOCK_MONOTONIC */
#ifndef CLOCK_MONOTONIC
#define CLOCK_MONOTONIC 1
#endif
static clockid_t get_linux_clock_source() {
struct timespec ts;
if (syscall(SYS_clock_gettime, CLOCK_MONOTONIC_COARSE, &ts) == 0) {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment