pub fn after_ms(duration: u32) -> Receiver<()>Expand description
Creates a new rendezvous channel that is dropped after a timeout.
duration is specified in milliseconds.
When the channel is dropped, any receive operation on the returned channel will be unblocked.
N.B. This will eventually be deprecated when we get a proper duration type.
ยงExample
let wait = chan::after_ms(1000);
// Unblocks after 1 second.
wait.recv();