We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88f0c0d commit d55e299Copy full SHA for d55e299
library/std/src/sys/unix/time.rs
@@ -146,12 +146,14 @@ mod inner {
146
type mach_timebase_info_t = *mut mach_timebase_info;
147
type kern_return_t = libc::c_int;
148
149
+ pub type clockid_t = libc::clockid_t;
150
+
151
impl Instant {
152
pub fn now() -> Instant {
153
extern "C" {
- fn clock_gettime_nsec_np(clock_type: u32) -> u64;
154
+ fn clock_gettime_nsec_np(clock_id: clockid_t) -> u64;
155
}
- Instant { t: unsafe { clock_gettime_nsec_np(4) } }
156
+ Instant { t: unsafe { clock_gettime_nsec_np(8) } }
157
158
159
pub fn checked_sub_instant(&self, other: &Instant) -> Option<Duration> {
0 commit comments