Skip to content

Commit f3ef98f

Browse files
committed
Use correct clock enum value
1 parent 17d39d6 commit f3ef98f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

library/std/src/sys/unix/time.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,9 @@ mod inner {
149149
impl Instant {
150150
pub fn now() -> Instant {
151151
extern "C" {
152-
//fn mach_absolute_time() -> u64;
153-
fn clock_gettime_nsec_np(clock_type: i64) -> u64;
152+
fn clock_gettime_nsec_np(clock_type: u32) -> u64;
154153
}
155-
Instant { t: unsafe { clock_gettime_nsec_np(4) } }
156-
//Instant { t: unsafe { mach_absolute_time() } }
154+
Instant { t: unsafe { clock_gettime_nsec_np(8) } }
157155
}
158156

159157
pub fn checked_sub_instant(&self, other: &Instant) -> Option<Duration> {

0 commit comments

Comments
 (0)