1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _LINUX_TIME_TYPES_H
3#define _LINUX_TIME_TYPES_H
4
5#include <linux/types.h>
6
7struct __kernel_timespec {
8 __kernel_time64_t tv_sec; /* seconds */
9 long long tv_nsec; /* nanoseconds */
10};
11
12struct __kernel_itimerspec {
13 struct __kernel_timespec it_interval; /* timer period */
14 struct __kernel_timespec it_value; /* timer expiration */
15};
16
17/*
18 * legacy timeval structure, only embedded in structures that
19 * traditionally used 'timeval' to pass time intervals (not absolute
20 * times). Do not add new users. If user space fails to compile
21 * here, this is probably because it is not y2038 safe and needs to
22 * be changed to use another interface.
23 */
24#ifndef __kernel_old_timeval
25struct __kernel_old_timeval {
26 __kernel_long_t tv_sec;
27 __kernel_long_t tv_usec;
28};
29#endif
30
31struct __kernel_old_timespec {
32 __kernel_old_time_t tv_sec; /* seconds */
33 long tv_nsec; /* nanoseconds */
34};
35
36struct __kernel_old_itimerval {
37 struct __kernel_old_timeval it_interval;/* timer interval */
38 struct __kernel_old_timeval it_value; /* current value */
39};
40
41struct __kernel_sock_timeval {
42 __s64 tv_sec;
43 __s64 tv_usec;
44};
45
46#endif /* _LINUX_TIME_TYPES_H */
47

source code of include/linux/time_types.h