![[index]](../icons/index.gif)
Next: Operating System Processes
Up: Time
Previous: Machine Time
The time-apply procedure collects timing information for a
procedure application:
- (time-apply thunk) invokes the procedure thunk with
no arguments. Three values are returned: a list containing the
result(s) of applying thunk, the number of milliseconds of CPU
time required to obtain this result, and the number of ``real''
milliseconds required for the result.
The reliability of the timing numbers depends on the operating
system. If multiple MzScheme threads are running, then the reported
time may include work performed by other threads.
The time syntactic form reports timing information
directly to the current output port:
- (time expr) times the evaluation of expr,
printing timing information to the current output port. This form
also prints the amount of time spent in garbage-collection (already
included in the CPU time). The result of the time expression is
the result of expr.
PLT