[−][src]Macro stakker::timer_max
Create or update a "Max" timer
A "Max" timer expires at the latest (greatest) expiry time
provided. Modifies a MaxTimerKey
variable or structure member
provided by the caller, which should be initialised with
Default::default()
(which is an invalid timer key). If the
timer key currently in the variable is invalid or expired, then a
new timer is created using the call-args following, and the key
stored in the variable. Otherwise the timer expiry time is
updated with the maximum of the current and provided expiry times,
and the call-args are ignored. The timer may be deleted using
Core::timer_max_del
.
The syntax of the calls is identical to call!
, but with a
variable reference and Instant
argument first. However the
plain [actor], ...
form is not accepted because a Core
reference is always needed.
let mut var = Default::default(); ::: timer_max!(&mut var, instant, ...args-as-for-call-macro...);
Implemented using Core::timer_max_upd
,
Core::timer_max_add
, Actor::apply
and
Actor::apply_prep
.