Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
time.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Linaro Limited
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_
8#define ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_
9
10#ifdef CONFIG_NEWLIB_LIBC
11/* Kludge to support outdated newlib version as used in SDK 0.10 for Xtensa */
12#include <newlib.h>
13
14#ifdef __NEWLIB__
15#include <sys/_timeval.h>
16#else
17#include <sys/types.h>
18struct timeval {
21};
22#endif
23
24#else
25#include <sys/types.h>
26#include <sys/_timeval.h>
27#endif /* CONFIG_NEWLIB_LIBC */
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33int gettimeofday(struct timeval *tv, void *tz);
34
35#ifdef __cplusplus
36}
37#endif
38
39#endif /* ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_ */
_TIME_T_ time_t
Definition _timespec.h:14
_SUSECONDS_T_ suseconds_t
Definition _timespec.h:19
int gettimeofday(struct timeval *tv, void *tz)
Definition _timeval.h:22
suseconds_t tv_usec
Definition _timeval.h:24
time_t tv_sec
Definition _timeval.h:23