We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17d39d6 commit f3ef98fCopy full SHA for f3ef98f
library/std/src/sys/unix/time.rs
@@ -149,11 +149,9 @@ mod inner {
149
impl Instant {
150
pub fn now() -> Instant {
151
extern "C" {
152
- //fn mach_absolute_time() -> u64;
153
- fn clock_gettime_nsec_np(clock_type: i64) -> u64;
+ fn clock_gettime_nsec_np(clock_type: u32) -> u64;
154
}
155
- Instant { t: unsafe { clock_gettime_nsec_np(4) } }
156
- //Instant { t: unsafe { mach_absolute_time() } }
+ Instant { t: unsafe { clock_gettime_nsec_np(8) } }
157
158
159
pub fn checked_sub_instant(&self, other: &Instant) -> Option<Duration> {
0 commit comments