timerfd.h 410 B

123456789101112131415161718192021222324
  1. #ifndef _SYS_TIMERFD_H
  2. #define _SYS_TIMERFD_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <time.h>
  7. #include <fcntl.h>
  8. #define TFD_NONBLOCK O_NONBLOCK
  9. #define TFD_CLOEXEC O_CLOEXEC
  10. #define TFD_TIMER_ABSTIME 1
  11. int timerfd_create(int, int);
  12. int timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *);
  13. int timerfd_gettime(int, struct itimerspec *);
  14. #ifdef __cplusplus
  15. }
  16. #endif
  17. #endif