29 static int io_clock_realtime_getres(
30 const io_clock_t *clock,
struct timespec *res);
31 static int io_clock_realtime_gettime(
33 static int io_clock_realtime_settime(
38 &io_clock_realtime_getres,
39 &io_clock_realtime_gettime,
40 &io_clock_realtime_settime
46 #endif // CLOCK_REALTIME
48 #ifdef CLOCK_MONOTONIC
50 static int io_clock_monotonic_getres(
51 const io_clock_t *clock,
struct timespec *res);
52 static int io_clock_monotonic_gettime(
54 static int io_clock_monotonic_settime(
59 &io_clock_monotonic_getres,
60 &io_clock_monotonic_gettime,
61 &io_clock_monotonic_settime
66 &io_clock_monotonic_vtbl
69 #endif // CLOCK_MONOTONIC
74 io_clock_realtime_getres(
const io_clock_t *clock,
struct timespec *res)
78 return clock_getres(CLOCK_REALTIME, res);
82 io_clock_realtime_gettime(
const io_clock_t *clock,
struct timespec *tp)
86 return clock_gettime(CLOCK_REALTIME, tp);
90 io_clock_realtime_settime(
io_clock_t *clock,
const struct timespec *tp)
94 return clock_settime(CLOCK_REALTIME, tp);
97 #endif // CLOCK_REALTIME
99 #ifdef CLOCK_MONOTONIC
102 io_clock_monotonic_getres(
const io_clock_t *clock,
struct timespec *res)
106 return clock_getres(CLOCK_MONOTONIC, res);
110 io_clock_monotonic_gettime(
const io_clock_t *clock,
struct timespec *tp)
114 return clock_gettime(CLOCK_MONOTONIC, tp);
118 io_clock_monotonic_settime(
io_clock_t *clock,
const struct timespec *tp)
122 return clock_settime(CLOCK_MONOTONIC, tp);
125 #endif // CLOCK_MONOTONIC