Handbook
Glossary
time ( quot -- )
Factor handbook
»
Developer tools
»
Timing code and collecting statistics
Next:
dispatch-stats. ( -- )
Vocabulary
tools
.
time
Inputs
quot
a
quotation
Outputs
None
Word description
Runs a quotation, gathering statistics about method dispatch and garbage collection, and then prints the total run time.
See also
benchmark
Definition
USING:
io
namespaces
tools.dispatch
tools.memory
;
IN:
tools.time
:
time
( quot -- )
[
[
benchmark
]
collect-dispatch-stats
last-dispatch-stats
set
]
collect-gc-events
gc-events
set
time.
nl
time-banner.
;
inline