_timeval.h 543 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2019 Linaro Limited
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS__TIMEVAL_H_
  7. #define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS__TIMEVAL_H_
  8. #include <sys/_types.h>
  9. #if !defined(__time_t_defined)
  10. #define __time_t_defined
  11. typedef _TIME_T_ time_t;
  12. #endif
  13. #if !defined(__suseconds_t_defined)
  14. #define __suseconds_t_defined
  15. typedef _SUSECONDS_T_ suseconds_t;
  16. #endif
  17. struct timeval {
  18. time_t tv_sec;
  19. suseconds_t tv_usec;
  20. };
  21. #endif /* ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS__TIMEVAL_H_ */