[−][src]Module tokio01_test::clock
A mocked clock for use with tokio_timer
based futures.
Example
clock::mock(|handle| { let mut delay = Delay::new(handle.now() + Duration::from_secs(1)); assert_not_ready!(delay.poll()); handle.advance(Duration::from_secs(1)); assert_ready!(delay.poll()); });
Structs
Handle | A handle to the |
MockClock | Mock clock for use with |
Functions
mock | Run the provided closure with a |
mock_at | Run the provided closure with a |