I need to count 5 minutes from now in Rust. I thought I could use time::now()
but it's deprecated. What can I use and how to do that?
相关问题
- Share Arc between closures
- Function references: expected bound lifetime param
- Pattern matching on slices
- How can I iteratively call Sha256::digest, passing
- Destructure a vector into variables and give away
相关文章
- How can I convert a f64 to f32 and get the closest
- What is a good way of cleaning up after a unit tes
- How can I unpack (destructure) elements from a vec
- How to import macros in Rust?
- How to get struct field names in Rust? [duplicate]
- Confusion between [T] and &[T]
- How do I initialize an opaque C struct when using
- What's the most idiomatic way to test two Opti
If you mouse over the "deprecated" note in the documentation, you'll see that it points you to the
rust-lang/time
repository. Basically, it got moved out of the standard library into its own package.Provided you add a dependency on the
time
crate as specified in the documentation, this works: