Call the goal Goal (as with once/1), and print the timings after the goal has succeeded or failed. The four times printed are:
- thread cputime (of the calling thread only)
- process cputime user (all threads)
- process cputime system (all threads)
- real time
Note that for multithreaded programs, the total process cputime
can be higher than the elapsed real time, because all the threads'
cputimes add up.
?- time( for(_,1,1000000) do true ).
Success, times: 1.0222s thread, 1.0200+0.0000s process, 1.03s real