Section "timer"

With the introducing of the async API the Prolog interpreter is able to process promises when in async mode. So far sleep/1 is the first predicate that relinquishes control. Further opportunities for the future will be input/output predicates. Last but not least the frequent garbage collection can be used to relinquish control on a regular basis.

The following timer predicates are provided:

sleep(T):
The predicate suspends execution for T milliseconds.
call_with_time_limit(T, G):
The predicate succeeds once if G succeeds. If the goal has not terminated after T milliseconds a time limit system error is signalled to the goal.
time(A):
The predicate succeeds whenever the goal A succeeds. As a side effect, timing of the call or redo is shown.