summaryrefslogtreecommitdiffstats
path: root/tokio/src/time/instant.rs
AgeCommit message (Collapse)Author
2020-10-12time: Clean up `Instant` docs to align with `std` (#2946)Lucio Franco
Co-authored-by: Alice Ryhl <alice@ryhl.io>
2020-10-01time: introduce `sleep` and `sleep_until` functions (#2826)Juan Alvarez
2020-02-17Added Ord and Hash as derived traits for tokio::time::Instant (#2239)Tudor Sidea
The added derived traits mirror the traits of std::time::Instant. As tokio::time::Instant is just a wrapper around std::time::Instant, it should also derive all the traits std::time::Instant derives.
2019-12-05time: impl From between std / tokio Instants (#1904)Steven Fackler
2019-11-12reorganize modules (#1766)Carl Lerche
This patch started as an effort to make `time::Timer` private. However, in an effort to get the build compiling again, more and more changes were made. This probably should have been broken up, but here we are. I will attempt to summarize the changes here. * Feature flags are reorganized to make clearer. `net-driver` becomes `io-driver`. `rt-current-thread` becomes `rt-core`. * The `Runtime` can be created without any executor. This replaces `enter`. It also allows creating I/O / time drivers that are standalone. * `tokio::timer` is renamed to `tokio::time`. This brings it in line with `std`. * `tokio::timer::Timer` is renamed to `Driver` and made private. * The `clock` module is removed. Instead, an `Instant` type is provided. This type defaults to calling `std::time::Instant`. A `test-util` feature flag can be used to enable hooking into time. * The `blocking` module is moved to the top level and is cleaned up. * The `task` module is moved to the top level. * The thread-pool's in-place blocking implementation is cleaned up. * `runtime::Spawner` is renamed to `runtime::Handle` and can be used to "enter" a runtime context.