Skip to content

Commit dc6fade

Browse files
authored
Rollup merge of #149997 - cvengler:posix-gettime, r=joboet
Link POSIX instead of Linux manual for Instant This commit changes the links in the source code that link to a platform specific implementation of the POSIX interface of `clock_gettime`, despite the respective areas in the code being specifically UNIX system agnostic, thereby making it more reasonable to link the POSIX specific document.
2 parents 3e412fa + 1e4befd commit dc6fade

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ impl Instant {
275275
#[cfg(not(target_vendor = "apple"))]
276276
pub(crate) const CLOCK_ID: libc::clockid_t = libc::CLOCK_MONOTONIC;
277277
pub fn now() -> Instant {
278-
// https://www.manpagez.com/man/3/clock_gettime/
278+
// https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_getres.html
279279
//
280280
// CLOCK_UPTIME_RAW clock that increments monotonically, in the same man-
281281
// ner as CLOCK_MONOTONIC_RAW, but that does not incre-

library/std/src/time.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ use crate::sys_common::{FromInner, IntoInner};
124124
/// [`insecure_time` usercall]: https://edp.fortanix.com/docs/api/fortanix_sgx_abi/struct.Usercalls.html#method.insecure_time
125125
/// [timekeeping in SGX]: https://edp.fortanix.com/docs/concepts/rust-std/#codestdtimecode
126126
/// [__wasi_clock_time_get]: https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#clock_time_get
127-
/// [clock_gettime]: https://linux.die.net/man/3/clock_gettime
127+
/// [clock_gettime]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_getres.html
128128
///
129129
/// **Disclaimer:** These system calls might change over time.
130130
///
@@ -234,7 +234,7 @@ pub struct Instant(time::Instant);
234234
/// [currently]: crate::io#platform-specific-behavior
235235
/// [`insecure_time` usercall]: https://edp.fortanix.com/docs/api/fortanix_sgx_abi/struct.Usercalls.html#method.insecure_time
236236
/// [timekeeping in SGX]: https://edp.fortanix.com/docs/concepts/rust-std/#codestdtimecode
237-
/// [clock_gettime (Realtime Clock)]: https://linux.die.net/man/3/clock_gettime
237+
/// [clock_gettime (Realtime Clock)]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_getres.html
238238
/// [__wasi_clock_time_get (Realtime Clock)]: https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#clock_time_get
239239
/// [GetSystemTimePreciseAsFileTime]: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimepreciseasfiletime
240240
/// [GetSystemTimeAsFileTime]: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimeasfiletime

0 commit comments

Comments
 (0)