SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
sys/time.h
Go to the documentation of this file.
1/*
2 * SuperTinyKernel(TM) RTOS: Lightweight High-Performance Deterministic C++ RTOS for Embedded Systems.
3 *
4 * Source: https://github.com/SuperTinyKernel-RTOS
5 *
6 * Copyright (c) 2022-2026 Neutron Code Limited <stk@neutroncode.com>. All Rights Reserved.
7 * License: MIT License, see LICENSE for a full text.
8 */
9
10#ifndef STK_C_SYS_TIME_POSIX_H_
11#define STK_C_SYS_TIME_POSIX_H_
12
30
31#ifndef _SYS__PTHREADTYPES_H_
32 #define _SYS__PTHREADTYPES_H_
33 #define STK_C_PTHREADTYPES_GUARD
34#endif
35
36#ifndef STK_C_SYSTEM_SYS_TIME_H
37 #if defined(__GNUC__) || defined(__clang__)
38 #include_next <sys/time.h>
39 #else
40 #error "Define STK_C_SYSTEM_SYS_TIME_H to the toolchain's sys/time.h for this compiler"
41 #endif
42#else
43 #include STK_C_SYSTEM_SYS_TIME_H
44#endif
45
46struct timezone; /* obsolete, only passed through the interface */
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
56#ifndef STK_C_NO_GETTIMEOFDAY_DECL
57
64int gettimeofday(struct timeval *tv, void *tz);
65
73int settimeofday(const struct timeval *tv, const struct timezone *tz);
74
75#endif /* STK_C_NO_GETTIMEOFDAY_DECL */
76
77#ifdef __cplusplus
78}
79#endif
80
81#endif /* STK_C_SYS_TIME_POSIX_H_ */
int gettimeofday(struct timeval *tv, void *tz)
Get the wall time (microsecond fields, tick resolution).
int settimeofday(const struct timeval *tv, const struct timezone *tz)
Set the wall time (microsecond precision): the offset of time() / gettimeofday() is changed,...