time.h 599 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include <sys/types.h>
  8. #include_next <time.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #define _POSIX_TIMERS 1
  13. #ifndef CLOCK_MONOTONIC
  14. #define CLOCK_MONOTONIC (clockid_t)4
  15. #endif
  16. #ifndef CLOCK_BOOTTIME
  17. #define CLOCK_BOOTTIME (clockid_t)4
  18. #endif
  19. int clock_settime(clockid_t clock_id, const struct timespec *tp);
  20. int clock_gettime(clockid_t clock_id, struct timespec *tp);
  21. int clock_getres(clockid_t clock_id, struct timespec *res);
  22. #ifdef __cplusplus
  23. }
  24. #endif