ReactOS
0.4.16-dev-297-gc569aee
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
time.h
Go to the documentation of this file.
1
/* @(#)time.h 1.20 13/10/01 Copyright 1996-2013 J. Schilling */
2
/*
3
* Generic header for users of time(), gettimeofday() ...
4
*
5
* It includes definitions for time_t, struct timeval, ...
6
*
7
* Copyright (c) 1996-2013 J. Schilling
8
*/
9
/*
10
* The contents of this file are subject to the terms of the
11
* Common Development and Distribution License, Version 1.0 only
12
* (the "License"). You may not use this file except in compliance
13
* with the License.
14
*
15
* See the file CDDL.Schily.txt in this distribution for details.
16
* A copy of the CDDL is also available via the Internet at
17
* http://www.opensource.org/licenses/cddl1.txt
18
*
19
* When distributing Covered Code, include this CDDL HEADER in each
20
* file and include the License file CDDL.Schily.txt from this distribution.
21
*/
22
23
#ifndef _SCHILY_TIME_H
24
#define _SCHILY_TIME_H
25
26
#ifndef _SCHILY_MCONFIG_H
27
#include <
schily/mconfig.h
>
28
#endif
29
30
#ifndef _SCHILY_TYPES_H
31
#include <
schily/types.h
>
/* Needed for time_t */
32
#endif
33
34
#ifdef TIME_WITH_SYS_TIME
35
# ifndef _INCL_SYS_TIME_H
36
# include <
sys/time.h
>
37
# define _INCL_SYS_TIME_H
38
# endif
39
# ifndef _INCL_TIME_H
40
# include <
time.h
>
41
# define _INCL_TIME_H
42
# endif
43
#else
44
#ifdef HAVE_SYS_TIME_H
45
# ifndef _INCL_SYS_TIME_H
46
# include <
sys/time.h
>
47
# define _INCL_SYS_TIME_H
48
# endif
49
#else
50
# ifndef _INCL_TIME_H
51
# include <
time.h
>
52
# define _INCL_TIME_H
53
# endif
54
#endif
55
#endif
56
57
#ifdef __cplusplus
58
extern
"C"
{
59
#endif
60
61
#ifdef timerclear
62
/*
63
* With MSVC timerclear / struct timeval present in case that
64
* winsock2.h has been included before.
65
*/
66
#undef HAVE_STRUCT_TIMEVAL
67
#define HAVE_STRUCT_TIMEVAL 1
68
#endif
69
70
#ifndef HAVE_STRUCT_TIMEVAL
71
72
struct
timeval
{
73
long
tv_sec
;
74
long
tv_usec
;
75
};
76
#endif
77
78
#ifndef HAVE_STRUCT_TIMEZONE
79
80
struct
timezone
{
81
int
tz_minuteswest
;
82
int
tz_dsttime
;
83
};
84
#endif
85
86
#ifndef HAVE_STRUCT_TIMESPEC
87
88
struct
timespec
{
89
time_t
tv_sec
;
90
long
tv_nsec
;
91
};
92
#endif
93
94
95
#undef timerclear
96
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
97
98
#undef timerfix
99
#define timerfix1(tvp) while ((tvp)->tv_usec < 0) { \
100
(tvp)->tv_sec--; \
101
(tvp)->tv_usec += 1000000; \
102
}
103
104
#define timerfix2(tvp) while ((tvp)->tv_usec > 1000000) { \
105
(tvp)->tv_sec++; \
106
(tvp)->tv_usec -= 1000000; \
107
}
108
109
#define timerfix(tvp) do { timerfix1(tvp); timerfix2(tvp); } while (0)
110
111
/*
112
* timersub() and timeradd() are defined on FreeBSD with a different
113
* interface (3 parameters).
114
*/
115
#undef timersub
116
#define timersub(tvp1, tvp2) do { \
117
(tvp1)->tv_sec -= (tvp2)->tv_sec; \
118
(tvp1)->tv_usec -= (tvp2)->tv_usec; \
119
timerfix1(tvp1); timerfix2(tvp1); \
120
} while (0)
121
122
#undef timeradd
123
#define timeradd(tvp1, tvp2) do { \
124
(tvp1)->tv_sec += (tvp2)->tv_sec; \
125
(tvp1)->tv_usec += (tvp2)->tv_usec; \
126
timerfix1(tvp1); timerfix2(tvp1); \
127
} while (0)
128
129
130
#undef timespecclear
131
#define timespecclear(tsp) (tsp)->tv_sec = (tsp)->tv_nsec = 0
132
133
#undef timespecfix
134
#define timespecfix1(tsp) while ((tsp)->tv_nsec < 0) { \
135
(tsp)->tv_sec--; \
136
(tsp)->tv_nsec += 1000000000; \
137
}
138
139
#define timespecfix2(tsp) while ((tsp)->tv_nsec > 1000000000) { \
140
(tsp)->tv_sec++; \
141
(tsp)->tv_nsec -= 1000000000; \
142
}
143
144
#define timespecfix(tsp) do { timespecfix1(tsp); timespecfix2(tsp); } while (0)
145
146
#undef timespecsub
147
#define timespecsub(tsp1, tsp2) do { \
148
(tsp1)->tv_sec -= (tsp2)->tv_sec; \
149
(tsp1)->tv_nsec -= (tsp2)->tv_nsec; \
150
timespecfix1(tsp1); timespecfix2(tsp1); \
151
} while (0)
152
153
#undef timespecadd
154
#define timespecadd(tsp1, tsp2) do { \
155
(tsp1)->tv_sec += (tsp2)->tv_sec; \
156
(tsp1)->tv_nsec += (tsp2)->tv_nsec; \
157
timespecfix1(tsp1); timespecfix2(tsp1); \
158
} while (0)
159
160
#ifdef __cplusplus
161
}
162
#endif
163
164
#endif
/* _SCHILY_TIME_H */
time_t
__kernel_time_t time_t
Definition:
linux.h:252
mconfig.h
time.h
time.h
types.h
timespec
Definition:
time.h:88
timespec::tv_nsec
long tv_nsec
Definition:
time.h:90
timespec::tv_sec
time_t tv_sec
Definition:
time.h:89
timeval
Definition:
linux.h:1737
timeval::tv_sec
unsigned long tv_sec
Definition:
linux.h:1738
timeval::tv_usec
unsigned long tv_usec
Definition:
linux.h:1739
timezone
Definition:
fake.h:14
timezone::tz_minuteswest
int tz_minuteswest
Definition:
fake.h:15
timezone::tz_dsttime
int tz_dsttime
Definition:
fake.h:16
sdk
tools
mkisofs
schilytools
include
schily
time.h
Generated on Tue Nov 26 2024 06:14:27 for ReactOS by
1.9.6