use ;
use TimeoutFuture;
// @TODO add fetch cmd?
// ------ Timeout cmd ------
/// Set timeout in milliseconds.
///
/// Handler has to return `Msg`, `Option<Msg>` or `()`.
///
/// # Example
///
/// ```rust,no_run
///orders.perform_cmd_with_handle(cmds::timeout(2000, || Msg::OnTimeout));
///orders.perform_cmd(cmds::timeout(1000, || log!("Tick!")));
/// ```
///
/// # Panics
///
/// Panics when the command doesn't return `Msg`, `Option<Msg>` or `()`.
/// (It will be changed to a compile-time error).