diff options
Diffstat (limited to 'doc/time.n')
-rw-r--r-- | doc/time.n | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: time.n,v 1.3 2000/09/07 14:27:52 poenitz Exp $ +'\" RCS: @(#) $Id: time.n,v 1.4 2004/04/30 20:25:26 dkf Exp $ '\" .so man.macros .TH time n "" Tcl "Tcl Built-In Commands" @@ -28,6 +28,17 @@ specified). It will then return a string of the form which indicates the average amount of time required per iteration, in microseconds. Time is measured in elapsed time, not CPU time. +.SH EXAMPLE +Estimate how long it takes for a simple Tcl \fBfor\fR loop to count to +a thousand: + +.CS +time { + for {set i 0} {$i<1000} {incr i} { + # empty body + } +} +.CE .SH "SEE ALSO" clock(n) |