diff options
Diffstat (limited to 'doc/time.n')
-rw-r--r-- | doc/time.n | 12 |
1 files changed, 11 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.3.18.1 2004/10/27 14:43:14 dkf Exp $ '\" .so man.macros .TH time n "" Tcl "Tcl Built-In Commands" @@ -28,6 +28,16 @@ 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) |