Add duration constants · Pull Request #57375 · rust-lang/rust
ghost
mentioned this pull request
kennytm
added
the
T-libs-api
label
Jan 6, 2019
bors
added
S-waiting-on-bors
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.labels
Jan 6, 2019
bors
added
S-waiting-on-author
and removed S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.labels
Jan 7, 2019
bors
added
S-waiting-on-bors
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.labels
Jan 7, 2019emilyalbini added a commit to emilyalbini/rust that referenced this pull request
Jan 7, 2019…triplett Add duration constants Add constants `SECOND`, `MILLISECOND`, `MICROSECOND`, and `NANOSECOND` to `core::time`. This will make working with durations more ergonomic. Compare: ```rust // Convenient, but deprecated function. thread::sleep_ms(2000); // The current canonical way to sleep for two seconds. thread::sleep(Duration::from_secs(2)); // Sleeping using one of the new constants. thread::sleep(2 * SECOND); ```
bors added a commit that referenced this pull request
Jan 7, 2019Rollup of 6 pull requests Successful merges: - #57290 (remove outdated comment) - #57308 (Make CompileController thread-safe) - #57358 (use utf-8 throughout htmldocck) - #57369 (Provide the option to use libc++ even on all platforms) - #57375 (Add duration constants) - #57403 (Make extern ref HTTPS) Failed merges: - #57370 (Support passing cflags/cxxflags/ldflags to LLVM build) r? @ghost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters