- alarm(+Time, :Callable, -Id) is det
- alarm(+Time, :Callable, -Id, +Options) is det
- Set up an alarm to be signaled Time seconds from now. If the
alarm expires, Callable is called asynchronously. Callable can
be used to raise an exception using throw/1 to abort some
execution.
Options is a list of Name(Value) options. Currently defined options are:
- remove(Bool)
- If
true(defaultfalse), remove the alarm-event (as remove_alarm/1) after it has been fired. Id remains valid, i.e., it is safe to call remove_alarm/1 on Id regardless of whether or not the alarm has fired. - install(Bool)
- If
false(defaulttrue) do not install the alarm. It must be installed separately using install_alarm/1.