posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
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
17#ifndef ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_
18#define ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_
19
20#include <sys/types.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#if !defined(_TIMEVAL_DECLARED) && !defined(__timeval_defined)
27struct timeval {
28 time_t tv_sec;
30};
31#define _TIMEVAL_DECLARED
32#define __timeval_defined
33#endif
34
45int gettimeofday(struct timeval *tv, void *tz);
46
47
48#ifdef __cplusplus
49}
50#endif
51
52#endif /* ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_ */
long suseconds_t
Microsecond time component type.
Definition select.h:57
int gettimeofday(struct timeval *tv, void *tz)
Get the current time with microsecond resolution.
Time value with microsecond resolution.
Definition select.h:81
suseconds_t tv_usec
Microseconds [0, 999999].
Definition select.h:83
time_t tv_sec
Seconds.
Definition select.h:82
POSIX fundamental types (<sys/types.h>)