]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #68161 - ruuda:fix-instant-docs, r=rkruppe
authorYuki Okushi <huyuumi.dev@gmail.com>
Mon, 13 Jan 2020 07:44:24 +0000 (16:44 +0900)
committerGitHub <noreply@github.com>
Mon, 13 Jan 2020 07:44:24 +0000 (16:44 +0900)
Fix system call docs for time::Instant

The link for UNIX was pointing to the Cloud ABI docs. It should have been pointing to the `clock_gettime` docs instead. A similar table is repeated in the docs for `SystemTime`, but there the UNIX entry was already correct.

`clock_gettime(CLOCK_MONOTONIC)` is the current implementation: https://github.com/rust-lang/rust/blob/3ebcfa1451cfedc13a07e6353d8ade9742dfdc2a/src/libstd/sys/unix/time.rs#L274
https://github.com/rust-lang/rust/blob/3ebcfa1451cfedc13a07e6353d8ade9742dfdc2a/src/libstd/sys/unix/time.rs#L348-L352

r? @steveklabnik

src/libstd/time.rs

index 0dce8f810eb137d520ec6b0876230774fecc9e03..0b6e728dceb1d49719d9130d575f2ba8b3d0a273 100644 (file)
@@ -67,7 +67,7 @@
 /// |:---------:|:--------------------------------------------------------------------:|
 /// | Cloud ABI | [clock_time_get (Monotonic Clock)]                                   |
 /// | SGX       | [`insecure_time` usercall]. More information on [timekeeping in SGX] |
-/// | UNIX      | [clock_time_get (Monotonic Clock)]                                   |
+/// | UNIX      | [clock_gettime (Monotonic Clock)]                                    |
 /// | Darwin    | [mach_absolute_time]                                                 |
 /// | VXWorks   | [clock_gettime (Monotonic Clock)]                                    |
 /// | WASI      | [__wasi_clock_time_get (Monotonic Clock)]                            |