|Did you know ...||Search Documentation:|
|Time and alarm library|
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
The resolution of the alarm depends on the underlying implementation, which is based on pthread_cond_timedwait() (on Windows on the pthread emulation thereof). Long-running foreign predicates that do not call PL_handle_signals() may further delay the alarm. The relation to blocking system calls (sleep, reading from slow devices, etc.) is undefined and varies between implementations.
Options is a list of
terms. Defined options are:
alarm(Time, Callable, Id,).
install(false)or stopped using uninstall_alarm/1.
doneif the alarm has been called,
nextif it is the next to be fired and scheduled otherwise.
time_limit_exceeded. See catch/3.