Portable build framework for OpenNTPD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
428 B

  1. /*
  2. * Public domain
  3. * time.h compatibility shim
  4. */
  5. #include_next <time.h>
  6. #ifndef LIBCOMPAT_TIME_H
  7. #define LIBCOMPAT_TIME_H
  8. #ifndef CLOCK_REALTIME
  9. typedef int clockid_t;
  10. #define CLOCK_REALTIME 1
  11. #define CLOCK_MONOTONIC 2
  12. #endif
  13. #ifndef HAVE_CLOCK_GETRES
  14. int clock_getres(clockid_t clk_id, struct timespec *res);
  15. #endif
  16. #ifndef HAVE_CLOCK_GETTIME
  17. int clock_gettime(clockid_t clk_id, struct timespec *ts);
  18. #endif
  19. #endif