25 #ifndef LELY_IO2_CLOCK_H_ 26 #define LELY_IO2_CLOCK_H_ 31 #ifndef LELY_IO_CLOCK_INLINE 32 #define LELY_IO_CLOCK_INLINE static inline 43 int (*getres)(
const io_clock_t *clock,
struct timespec *res);
44 int (*gettime)(
const io_clock_t *clock,
struct timespec *tp);
45 int (*settime)(io_clock_t *clock,
const struct timespec *tp);
60 const io_clock_t *clock,
struct timespec *res);
72 const io_clock_t *clock,
struct timespec *tp);
87 io_clock_t *clock,
const struct timespec *tp);
92 return (*clock)->getres(clock, res);
98 return (*clock)->gettime(clock, tp);
104 return (*clock)->settime(clock, tp);
111 #endif // !LELY_IO2_CLOCK_H_
const struct io_clock_vtbl *const io_clock_t
An abstract clock.
This is the public header file of the I/O library.
int io_clock_settime(io_clock_t *clock, const struct timespec *tp)
Sets the time value of the specified clock.
int io_clock_getres(const io_clock_t *clock, struct timespec *res)
Obtains the resolution of the specified clock.
This header file is part of the C11 and POSIX compatibility library; it includes <time.h> and defines any missing functionality.
int io_clock_gettime(const io_clock_t *clock, struct timespec *tp)
Obtains the current time value of the specified clock.