16 library(time): Time and alarm library
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog C-library
        • library(time): Time and alarm library
          • alarm/3
          • alarm/4
          • alarm_at/3
          • alarm_at/4
          • install_alarm/1
          • install_alarm/2
          • uninstall_alarm/1
          • remove_alarm/1
          • current_alarm/4
          • call_with_time_limit/2
          • call_with_time_limit/3
Availability::- use_module(library(time)).(can be autoloaded)
Source[det]alarm(+Time, :Callable, -Id)
[det]alarm(+Time, :Callable, -Id, +Options)
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 (default false), remove the alarm-event (as remove_alarm/1) after it has been fired.
install(Bool)
If false (default true) do not install the alarm. It must be installed separately using install_alarm/1.