1 /* 2 * Copyright (c) 2019 Linaro Limited 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS__TIMESPEC_H_ 8 #define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS__TIMESPEC_H_ 9 10 #include <sys/_types.h> 11 12 #if !defined(__time_t_defined) 13 #define __time_t_defined 14 typedef _TIME_T_ time_t; 15 #endif 16 17 #if !defined(__suseconds_t_defined) 18 #define __suseconds_t_defined 19 typedef _SUSECONDS_T_ suseconds_t; 20 #endif 21 22 #if !defined(_TIMESPEC_DECLARED) && !defined(__timespec_defined) 23 struct timespec { 24 time_t tv_sec; 25 long tv_nsec; 26 }; 27 #define __timespec_defined 28 #define _TIMESPEC_DECLARED 29 #endif 30 31 #endif /* ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS__TIMESPEC_H_ */ 32