This library provides predicates to obtain information about resource usage by your program. The predicates of this library are for human use at the toplevel: information is printed. All predicates obtain their information using public low-level primitives. These primitives can be use to obtain selective statistics during execution.
Statistics are retrieved using thread_statistics/3 on the calling thread. Note that not all systems support thread-specific CPU time. Notable, this is lacking on MacOS X.
call_time/2 is defined as below. Note that for call_time/2 the time is only available if Goal succeeds.
call_time(Goal, Time) :- call_time(Goal, Time, Result), call(Result).
The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.
call_time/2 is defined as below. Note that for call_time/2 the time is only available if Goal succeeds.
call_time(Goal, Time) :- call_time(Goal, Time, Result), call(Result).