pub fn use_timeout(duration: impl FnOnce() -> Duration) -> TimeoutExpand description
Create a timeout with a given Duration. This is useful to dinamically render a UI if only the timeout has not elapsed yet.
You can reset it by calling Timeout::reset, use Timeout::elapsed to check if it has timed out or not.