2019-04-24 05:43:25 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2019 Linaro Limited
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_
|
|
|
|
#define ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_
|
|
|
|
|
2019-04-24 22:46:05 +08:00
|
|
|
#ifdef CONFIG_NEWLIB_LIBC
|
|
|
|
/* Kludge to support outdated newlib version as used in SDK 0.10 for Xtensa */
|
|
|
|
#include <newlib.h>
|
|
|
|
|
|
|
|
#ifdef __NEWLIB__
|
|
|
|
#include <sys/_timeval.h>
|
|
|
|
#else
|
|
|
|
#include <sys/types.h>
|
|
|
|
struct timeval {
|
|
|
|
time_t tv_sec;
|
|
|
|
suseconds_t tv_usec;
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#else
|
2019-04-24 05:43:25 +08:00
|
|
|
#include <sys/_timeval.h>
|
2019-04-24 22:46:05 +08:00
|
|
|
#endif /* CONFIG_NEWLIB_LIBC */
|
2019-04-24 05:43:25 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int gettimeofday(struct timeval *tv, const void *tz);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_ */
|