Closed
Description
During the write of an embedded library I needed to make a pause of 10 microseconds. Looking over the Nightly std::time::Duration
documentation page I understood that I had to use the following construction:
// Wait 10 microseconds
thread::sleep(Duration::new(0, 10_000));
The sad part is that this is less clear to me than Duration::from_micros(10)
. Currently the from_millis
and from_secs
functions are implemented but not from_micros
which could help write cleaner code IMO.
The fix seems pretty easy, maybe if you judge this useful I can try to write my first pull request to the Rust project!
Metadata
Metadata
Assignees
Labels
Blocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFCRelevant to the library API team, which will review and decide on the PR/issue.In the final comment period and will be merged soon unless new substantive objections are raised.