Skip to content

TimeAPI

leftmike edited this page Sep 19, 2017 · 2 revisions

(import (foment base)) to use these procedures.

Time

procedure: (process-times)

Returns a list of user time, system time, user time spent in garbage collection, and system time spent in garbage collection. These are all CPU times in milliseconds and are since the last time that process-times-reset! was called or since process startup.

procedure: (process-times-reset!)

Reset the timing information returned by process_times to zero.

procedure: (time-apply proc lst)

Collect timing information about applying proc to lst. Four values are returned: a list of result(s) from applying proc to lst, the number of milliseconds of CPU time used, the number of milliseconds of real time, and the number of milliseconds of CPU time spent in garbage collect.

procedure: (time expr expr ...)

Report timing information from time-apply to the current output port and return the result(s) of the last expr.

Clone this wiki locally