otplike.timer
This namespace contains helper functions to perform process-related
actions (like sending a message, or exit signal) with a delay.
apply-after
(apply-after msecs f)
(apply-after msecs f args)
Applies f to args after msecs.
Returns the timer reference.
Throws on bad arguments.
apply-interval
(apply-interval msecs f)
(apply-interval msecs f args)
Evaluates (! pid message) repeatedly at intervals of msecs.
Returns the timer reference.
Throws on bad arguments.
cancel
(cancel tref)
Cancels a previously requested timeout. tref is a unique timer
reference returned by the related timer function.
Throws if tref is not a timer reference.
exit-after
(exit-after msecs reason)
(exit-after msecs pid reason)
Sends an exit signal with reason to pid after msecs. Pid can be a pid
or a registered name.
Returns the timer reference.
Throws on bad arguments.
kill-after
(kill-after msecs)
(kill-after msecs pid)
The same as exit-after called with reason :kill.
send-after
(send-after msecs message)
(send-after msecs pid message)
Evaluates (! pid message) after msecs.
Returns the timer reference.
Throws on bad arguments.
send-interval
(send-interval msecs message)
(send-interval msecs pid message)
Evaluates (! pid message) repeatedly at intervals of msecs.
Returns the timer reference.
Throws on bad arguments.