after

Function after 

Source
pub fn after(duration: Duration) -> Receiver<()>
Expand description

Creates a new rendezvous channel that is dropped after a timeout.

When the channel is dropped, any receive operation on the returned channel will be unblocked.

ยงExample

use std::time::Duration;

let wait = chan::after(Duration::from_millis(1000));
// Unblocks after 1 second.
wait.recv();