time
time()
returns total CPU time and GC time measured
from the start of current Asir session. It also returns the elapsed
time. Time unit is `second.'
Moreover, it returns total memory quantities in words
(usually 4 bytes) which are requested
to the memory manager from the beginning of the current session.
The return value is a list and the format is [CPU time, GC time,
Memory, Elapsed time]
.
time()
at the beginning
and the ending of the computation.
cputime
switch is active by ctrl()
or by
cputime()
, the execution time will be displayed after every
evaluation of top level statement.
In a program, however, in order to know the execution time for a
sequence of computations, you have to use time()
command, for
an example.
getrusage()
is available, time()
reports
reliable figures. On Windows NT it also gives reliable CPU time.
However, on Windows 95/98, the reported time is nothing but
the elapsed time of the real world.
Therefore, the time elapsed in the debug-mode and the time of waiting
for a reply to interruption prompting are added to the elapsed time.
[72] T0=time(); [2.390885,0.484358,46560,9.157768] [73] G=hgr(katsura(4),[u4,u3,u2,u1,u0],2)$ [74] T1=time(); [8.968048,7.705907,1514833,63.359717] [75] ["CPU",T1[0]-T0[0],"GC",T1[1]-T0[1]]; [CPU,6.577163,GC,7.221549]
cputime
, tstart
, tstop
.
Go to the first, previous, next, last section, table of contents.