This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -290,9 +290,9 @@ mod inner {
290290 impl Instant {
291291 pub fn now ( ) -> Instant {
292292 #[ 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 ;
294294 #[ cfg( not( target_os = "macos" ) ) ]
295- const clock_id: clock_t = libc:: CLOCK_MONOTONIC ;
295+ const clock_id: libc :: clockid_t = libc:: CLOCK_MONOTONIC ;
296296 Instant { t : Timespec :: now ( clock_id) }
297297 }
298298
@@ -324,13 +324,8 @@ mod inner {
324324 }
325325 }
326326
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-
332327 impl Timespec {
333- pub fn now ( clock : clock_t ) -> Timespec {
328+ pub fn now ( clock : libc :: clockid_t ) -> Timespec {
334329 // Try to use 64-bit time in preparation for Y2038.
335330 #[ cfg( all( target_os = "linux" , target_env = "gnu" , target_pointer_width = "32" ) ) ]
336331 {
You can’t perform that action at this time.
0 commit comments