File tree 1 file changed +3
-8
lines changed
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -290,9 +290,9 @@ mod inner {
290
290
impl Instant {
291
291
pub fn now ( ) -> Instant {
292
292
#[ cfg( target_os = "macos" ) ]
293
- const clock_id: clock_t = libc:: CLOCK_UPTIME_RAW ;
293
+ const clock_id: libc :: clockid_t = libc:: CLOCK_UPTIME_RAW ;
294
294
#[ cfg( not( target_os = "macos" ) ) ]
295
- const clock_id: clock_t = libc:: CLOCK_MONOTONIC ;
295
+ const clock_id: libc :: clockid_t = libc:: CLOCK_MONOTONIC ;
296
296
Instant { t : Timespec :: now ( clock_id) }
297
297
}
298
298
@@ -324,13 +324,8 @@ mod inner {
324
324
}
325
325
}
326
326
327
- #[ cfg( not( any( target_os = "dragonfly" , target_os = "espidf" , target_os = "horizon" ) ) ) ]
328
- pub type clock_t = libc:: c_int ;
329
- #[ cfg( any( target_os = "dragonfly" , target_os = "espidf" , target_os = "horizon" ) ) ]
330
- pub type clock_t = libc:: c_ulong ;
331
-
332
327
impl Timespec {
333
- pub fn now ( clock : clock_t ) -> Timespec {
328
+ pub fn now ( clock : libc :: clockid_t ) -> Timespec {
334
329
// Try to use 64-bit time in preparation for Y2038.
335
330
#[ cfg( all( target_os = "linux" , target_env = "gnu" , target_pointer_width = "32" ) ) ]
336
331
{
You can’t perform that action at this time.
0 commit comments