factor/basis/tools/time/time-docs.factor

26 lines
843 B
Factor
Raw Normal View History

2007-09-20 18:09:08 -04:00
USING: help.markup help.syntax memory system ;
IN: tools.time
ARTICLE: "timing" "Timing code"
"You can time the execution of a quotation in the listener:"
{ $subsections time }
2007-09-20 18:09:08 -04:00
"A lower-level word puts timings on the stack, intead of printing:"
{ $subsections benchmark }
2009-10-27 04:37:05 -04:00
"You can also read the system clock directly:"
{ $subsections micros }
{ $see-also "profiling" "calendar" } ;
2007-09-20 18:09:08 -04:00
ABOUT: "timing"
HELP: benchmark
{ $values { "quot" "a quotation" }
{ "runtime" "the runtime in microseconds" } }
2008-05-10 16:23:49 -04:00
{ $description "Runs a quotation, measuring the total wall clock time." }
2007-09-20 18:09:08 -04:00
{ $notes "A nicer word for interactive use is " { $link time } "." } ;
HELP: time
{ $values { "quot" "a quotation" } }
2009-10-27 04:37:05 -04:00
{ $description "Runs a quotation and then prints the total run time and some statistics." } ;
2007-09-20 18:09:08 -04:00
{ benchmark micros time } related-words