… | |
… | |
359 | #endif |
359 | #endif |
360 | |
360 | |
361 | /* on linux, we can use a (slow) syscall to avoid a dependency on pthread, */ |
361 | /* on linux, we can use a (slow) syscall to avoid a dependency on pthread, */ |
362 | /* which makes programs even slower. might work on other unices, too. */ |
362 | /* which makes programs even slower. might work on other unices, too. */ |
363 | #if EV_USE_CLOCK_SYSCALL |
363 | #if EV_USE_CLOCK_SYSCALL |
364 | # include <syscall.h> |
364 | # include <sys/syscall.h> |
365 | # ifdef SYS_clock_gettime |
365 | # ifdef SYS_clock_gettime |
366 | # define clock_gettime(id, ts) syscall (SYS_clock_gettime, (id), (ts)) |
366 | # define clock_gettime(id, ts) syscall (SYS_clock_gettime, (id), (ts)) |
367 | # undef EV_USE_MONOTONIC |
367 | # undef EV_USE_MONOTONIC |
368 | # define EV_USE_MONOTONIC 1 |
368 | # define EV_USE_MONOTONIC 1 |
369 | # else |
369 | # else |