PLOGHELP TIME                                  Kathryn Seifert, Oct 1986
                                        Revised: Adrian Howard, Sep 1992


    ?- time(Goal).
    ?- times(Goal).

Keywords: timing, CPU time.

A library program to time Prolog predicates can be made available by
typing:

        ?- library(time).

Then you can do things like:

        ?- library(useful).
        ?- time(append([1,2,3,4,5], [a,b,c,d,e], _)).
        Time for append
            0.01 secs (CPU)
            0 secs (GC)
        yes

The displayed values refer to the amount of time spent within POPLOG.
They do not refer to "real" time and are not effected by any other
processes running on your machine

Often it is best to time something many times to get an idea of how long
it really takes. Another predicate, times/1, is provided, which just
does time/1 again and again until you interrupt it with <Ctrl-C>:

        ?- times(append([1,2,3,4,5], [a,b,c,d,e,f], L)).
        Time for append
            0.03 secs (CPU)
            0 secs (GC)
        Time for append
            0 secs (CPU)
            0 secs (GC)
        Time for append
            0.02 secs (CPU)
            0 secs (GC)
        <Ctrl-C>


-- RELATED DOCUMENTATION ----------------------------------------------

    *SYSTIME    --- Returns the CPU time of the current POPLOG session
    *POPGCTIME  --- The CPU time spent in automatic garbage collections
    *POPGCTRACE --- Controls the tracing of garbage collections
    *TIME       --- Timing a POP-11 procedures execution

    REF *TIMES  --- Details of POP-11 timing procedures.


--- C.all/plog/help/time
--- Copyright University of Sussex 1992. All rights reserved. ----------
