- 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
Options is a list of Name(Value) options. Currently defined options are:
- alarm_at(+Time, :Callable, -Id) is det
- alarm_at(+Time, :Callable, -Id, +Options) is det
- As alarm/3 and alarm/4, but schedule the alarm at an absolute point in time.
- install_alarm(+Id) is det
- install_alarm(+Id, +RelTime) is det
- Install an alarm allocated using alarm/4 with the
install(false)option or de-activated using uninstall_alarm/1. With a given RelTime, the alarm is scheduled at the RelTime from now. Otherwise it is scheduled on the same (absolute) time on which is was created.
- uninstall_alarm(+Id) is det
- De-activate an alarm. This does not invalidate Id, but ensures that the alarm will not fire. The alarm can be rescheduled to the original time using install_alarm/1 or to a new time using install_alarm/2.
- remove_alarm(+Id) is det
- Remove an alarm. If it has not yet been fired, it never will.
- current_alarm(?Time, :Goal, ?Id, ?Status) is nondet
- Enumerate the alarms in the schedule. Time is the absolute time
the event is scheduled for (see also get_time/1). Goal is the
goal to execute, Id is the identifier and Status is the
scheduling status. It takes the value
doneif the alarm has been fired,
nextif the event is the next to be executed and
- call_with_time_limit(+Time, :Goal) is semidet
- Call Goal, while watching out for a (wall-time) limit. If this
limit is exceeded, the exception
time_limit_exceededis raised. Goal is called as in once/1.