| Did you know ... | Search Documentation: |
| time.pl -- Time and alarm library |
The library(time) provides timing and alarm functions. Alarms are thread-specific, i.e., creating an alarm causes the alarm goal to be called in the thread that created it. The predicate current_alarm/4 only reports alarms that are related to the calling thread. If a thread terminates, all remaining alarms are silently removed. Most applications use call_with_time_limit/2.
alarm(+Time, :Callable, -Id) is det
alarm(+Time, :Callable, -Id, +Options) is detOptions is a list of Name(Value) options. Currently defined options are:
true (default false), remove the alarm-event (as
remove_alarm/1) after it has been fired.false (default true) do not install the alarm.
It must be installed separately using install_alarm/1.
alarm_at(+Time, :Callable, -Id) is det
alarm_at(+Time, :Callable, -Id, +Options) is det
install_alarm(+Id) is det
install_alarm(+Id, +RelTime) is detinstall(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
remove_alarm(+Id) is det
current_alarm(?Time, :Goal, ?Id, ?Status) is nondetdone if the alarm has
been fired, next if the event is the next to be executed and
scheduled otherwise.
call_with_time_limit(+Time, :Goal) is det
call_with_time_limit(+Time, :Goal, +Context) is dettime_limit_exceeded is raised.
call_with_time_limit/3 throws time_limit_exceeded(Context). Goal is
called as in once/1.
The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.
alarm(+Time, :Callable, -Id) is det
alarm(+Time, :Callable, -Id, +Options) is detOptions is a list of Name(Value) options. Currently defined options are:
true (default false), remove the alarm-event (as
remove_alarm/1) after it has been fired.false (default true) do not install the alarm.
It must be installed separately using install_alarm/1.
alarm_at(+Time, :Callable, -Id) is det
alarm_at(+Time, :Callable, -Id, +Options) is det
install_alarm(+Id) is det
install_alarm(+Id, +RelTime) is detinstall(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.
call_with_time_limit(+Time, :Goal) is det
call_with_time_limit(+Time, :Goal, +Context) is dettime_limit_exceeded is raised.
call_with_time_limit/3 throws time_limit_exceeded(Context). Goal is
called as in once/1.