@@ -57,10 +57,8 @@ impl ClockId {
57
57
#[ cfg( not( any(
58
58
target_os = "macos" ,
59
59
target_os = "ios" ,
60
- all(
61
- not( any( target_env = "uclibc" , target_env = "newlibc" ) ) ,
62
- any( target_os = "redox" , target_os = "hermit" , ) ,
63
- ) ,
60
+ target_os = "redox" ,
61
+ target_os = "hermit" ,
64
62
) ) ) ]
65
63
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
66
64
pub fn set_time ( self , timespec : TimeSpec ) -> Result < ( ) > {
@@ -73,30 +71,27 @@ impl ClockId {
73
71
}
74
72
75
73
#[ cfg( any(
74
+ target_os = "android" ,
75
+ target_os = "emscripten" ,
76
76
target_os = "fuchsia" ,
77
- all(
78
- not( any( target_env = "uclibc" , target_env = "newlib" ) ) ,
79
- any( target_os = "linux" , target_os = "android" , target_os = "emscripten" ) ,
80
- )
77
+ target_os = "linux"
81
78
) ) ]
82
79
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
83
80
pub const CLOCK_BOOTTIME : ClockId = ClockId ( libc:: CLOCK_BOOTTIME ) ;
84
81
#[ cfg( any(
82
+ target_os = "android" ,
83
+ target_os = "emscripten" ,
85
84
target_os = "fuchsia" ,
86
- all(
87
- not( any( target_env = "uclibc" , target_env = "newlib" ) ) ,
88
- any( target_os = "linux" , target_os = "android" , target_os = "emscripten" )
89
- )
85
+ target_os = "linux"
90
86
) ) ]
91
87
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
92
88
pub const CLOCK_BOOTTIME_ALARM : ClockId = ClockId ( libc:: CLOCK_BOOTTIME_ALARM ) ;
93
89
pub const CLOCK_MONOTONIC : ClockId = ClockId ( libc:: CLOCK_MONOTONIC ) ;
94
90
#[ cfg( any(
91
+ target_os = "android" ,
92
+ target_os = "emscripten" ,
95
93
target_os = "fuchsia" ,
96
- all(
97
- not( any( target_env = "uclibc" , target_env = "newlib" ) ) ,
98
- any( target_os = "linux" , target_os = "android" , target_os = "emscripten" )
99
- )
94
+ target_os = "linux"
100
95
) ) ]
101
96
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
102
97
pub const CLOCK_MONOTONIC_COARSE : ClockId = ClockId ( libc:: CLOCK_MONOTONIC_COARSE ) ;
@@ -107,25 +102,23 @@ impl ClockId {
107
102
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
108
103
pub const CLOCK_MONOTONIC_PRECISE : ClockId = ClockId ( libc:: CLOCK_MONOTONIC_PRECISE ) ;
109
104
#[ cfg( any(
105
+ target_os = "android" ,
106
+ target_os = "emscripten" ,
110
107
target_os = "fuchsia" ,
111
- all(
112
- not( any( target_env = "uclibc" , target_env = "newlib" ) ) ,
113
- any( target_os = "linux" , target_os = "android" , target_os = "emscripten" )
114
- )
108
+ target_os = "linux"
115
109
) ) ]
116
110
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
117
111
pub const CLOCK_MONOTONIC_RAW : ClockId = ClockId ( libc:: CLOCK_MONOTONIC_RAW ) ;
118
112
#[ cfg( any(
113
+ target_os = "android" ,
114
+ target_os = "emscripten" ,
119
115
target_os = "fuchsia" ,
120
- target_env = "uclibc" ,
121
116
target_os = "macos" ,
122
117
target_os = "ios" ,
123
118
target_os = "freebsd" ,
124
119
target_os = "dragonfly" ,
125
- all(
126
- not( target_env = "newlib" ) ,
127
- any( target_os = "linux" , target_os = "android" , target_os = "emscripten" )
128
- )
120
+ target_os = "redox" ,
121
+ target_os = "linux"
129
122
) ) ]
130
123
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
131
124
pub const CLOCK_PROCESS_CPUTIME_ID : ClockId = ClockId ( libc:: CLOCK_PROCESS_CPUTIME_ID ) ;
@@ -134,20 +127,18 @@ impl ClockId {
134
127
pub const CLOCK_PROF : ClockId = ClockId ( libc:: CLOCK_PROF ) ;
135
128
pub const CLOCK_REALTIME : ClockId = ClockId ( libc:: CLOCK_REALTIME ) ;
136
129
#[ cfg( any(
130
+ target_os = "android" ,
131
+ target_os = "emscripten" ,
137
132
target_os = "fuchsia" ,
138
- all(
139
- not( any( target_env = "uclibc" , target_env = "newlib" ) ) ,
140
- any( target_os = "linux" , target_os = "android" , target_os = "emscripten" )
141
- )
133
+ target_os = "linux"
142
134
) ) ]
143
135
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
144
136
pub const CLOCK_REALTIME_ALARM : ClockId = ClockId ( libc:: CLOCK_REALTIME_ALARM ) ;
145
137
#[ cfg( any(
138
+ target_os = "android" ,
139
+ target_os = "emscripten" ,
146
140
target_os = "fuchsia" ,
147
- all(
148
- not( any( target_env = "uclibc" , target_env = "newlib" ) ) ,
149
- any( target_os = "linux" , target_os = "android" , target_os = "emscripten" )
150
- )
141
+ target_os = "linux"
151
142
) ) ]
152
143
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
153
144
pub const CLOCK_REALTIME_COARSE : ClockId = ClockId ( libc:: CLOCK_REALTIME_COARSE ) ;
@@ -161,40 +152,29 @@ impl ClockId {
161
152
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
162
153
pub const CLOCK_SECOND : ClockId = ClockId ( libc:: CLOCK_SECOND ) ;
163
154
#[ cfg( any(
155
+ target_os = "emscripten" ,
164
156
target_os = "fuchsia" ,
165
- all(
166
- not( any( target_env = "uclibc" , target_env = "newlib" ) ) ,
167
- any(
168
- target_os = "emscripten" ,
169
- all( target_os = "linux" , target_env = "musl" )
170
- )
171
- )
157
+ all( target_os = "linux" , target_env = "musl" )
172
158
) ) ]
173
159
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
174
160
pub const CLOCK_SGI_CYCLE : ClockId = ClockId ( libc:: CLOCK_SGI_CYCLE ) ;
175
161
#[ cfg( any(
162
+ target_os = "android" ,
163
+ target_os = "emscripten" ,
176
164
target_os = "fuchsia" ,
177
- all(
178
- not( any( target_env = "uclibc" , target_env = "newlib" ) ) ,
179
- any(
180
- target_os = "emscripten" ,
181
- all( target_os = "linux" , target_env = "musl" )
182
- )
183
- )
165
+ target_os = "linux"
184
166
) ) ]
185
167
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
186
168
pub const CLOCK_TAI : ClockId = ClockId ( libc:: CLOCK_TAI ) ;
187
169
#[ cfg( any(
188
- target_env = "uclibc" ,
170
+ target_os = "android" ,
171
+ target_os = "emscripten" ,
189
172
target_os = "fuchsia" ,
190
173
target_os = "ios" ,
191
174
target_os = "macos" ,
192
175
target_os = "freebsd" ,
193
176
target_os = "dragonfly" ,
194
- all(
195
- not( target_env = "newlib" ) ,
196
- any( target_os = "linux" , target_os = "android" , target_os = "emscripten" , ) ,
197
- ) ,
177
+ target_os = "linux"
198
178
) ) ]
199
179
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
200
180
pub const CLOCK_THREAD_CPUTIME_ID : ClockId = ClockId ( libc:: CLOCK_THREAD_CPUTIME_ID ) ;
@@ -257,10 +237,9 @@ pub fn clock_gettime(clock_id: ClockId) -> Result<TimeSpec> {
257
237
#[ cfg( not( any(
258
238
target_os = "macos" ,
259
239
target_os = "ios" ,
260
- all(
261
- not( any( target_env = "uclibc" , target_env = "newlibc" ) ) ,
262
- any( target_os = "redox" , target_os = "hermit" , ) ,
263
- ) ,
240
+ target_env = "uclibc" ,
241
+ target_os = "redox" ,
242
+ target_os = "hermit" ,
264
243
) ) ) ]
265
244
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
266
245
pub fn clock_settime ( clock_id : ClockId , timespec : TimeSpec ) -> Result < ( ) > {
0 commit comments