Next Prev Up Top Contents Index

time

Macro
Summary

Determines the execution time of a form in the current environment.

Package

common-lisp

Signature

time form => result

Arguments

form

A form to be evaluated

Values

result

The result of the evaluation of the form.

Description

time can be used to determine execution times. The macro evaluates the form given to it as argument, and prints out some timing and size data: the user and system times (in seconds), the elapsed time (in hours, minutes and seconds), and the total amount of heap space allocated in executing the form (in bytes).

The timing and size data covers all stack groups, not just the one that invokes time. Note that time itself uses a small, constant amount of heap space.

Examples
USER 10 > (time (progn (format t "start")
                   (dotimes (a 100) nil)
                   (format t "end")))
startend
user time    =      0.080
system time  =      0.000
Elapsed time =  0:00:00
Allocation = 7880
NIL
See also

extended-time


LispWorks Reference Manual - 25 Jul 2003

Next Prev Up Top Contents Index