Skip to content

Fix system call docs for time::Instant - #68161

Merged
bors merged 1 commit into
rust-lang:masterfrom
ruuda:fix-instant-docs
Jan 13, 2020
Merged

Fix system call docs for time::Instant#68161
bors merged 1 commit into
rust-lang:masterfrom
ruuda:fix-instant-docs

Conversation

@ruuda

@ruudaruuda commented Jan 12, 2020

Copy link
Copy Markdown
Contributor

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:

Instant{t:now(libc::CLOCK_MONOTONIC)}

fnnow(clock:clock_t) -> Timespec{
letmut t = Timespec{t: libc::timespec{tv_sec:0,tv_nsec:0}};
cvt(unsafe{ libc::clock_gettime(clock,&mut t.t)}).unwrap();
t
}

r? @steveklabnik

The link for UNIX was pointing to the Cloud ABI docs. It should have
been pointing to the clock_gettime docs instead. The table is repeated
in the docs for SystemTime, but there the UNIX entry was already correct.
@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 12, 2020
@hanna-kruppe

Copy link
Copy Markdown
Contributor

Thanks!

@bors r+ rollup

@bors

bors commented Jan 12, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 827ee7a has been approved by rkruppe

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 12, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jan 13, 2020
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#L274https://github.com/rust-lang/rust/blob/3ebcfa1451cfedc13a07e6353d8ade9742dfdc2a/src/libstd/sys/unix/time.rs#L348-L352
r? @steveklabnik
@JohnTitorJohnTitor mentioned this pull request Jan 13, 2020
bors added a commit that referenced this pull request Jan 13, 2020
Rollup of 8 pull requests
Successful merges:
- #67313 (Document more use cases of dataflow)
- #67959 (rustdoc: improve stability mark arrows)
- #68097 (Specify units for test timeout environment variables)
- #68135 (restore some rustc_parse visibilities for rustfmt)
- #68145 (Expose `context::CheckLintNameResult`)
- #68156 (Fix crate paths in comments)
- #68157 (Clean up E0186 explanation)
- #68161 (Fix system call docs for time::Instant)
Failed merges:
r? @ghost
@bors
bors merged commit 827ee7a into rust-lang:masterJan 13, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@ruuda@hanna-kruppe@bors@steveklabnik@rust-highfive