diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-04-30 20:25:26 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-04-30 20:25:26 (GMT) |
commit | f47d1b8393c44b34c977dd109e936dd41ab81031 (patch) | |
tree | 197525463b2f219e709abe365666e6323a3df747 /doc/time.n | |
parent | b35ec627d06b2a09c7691d6b36b2b5b4f11c455b (diff) | |
download | tcl-f47d1b8393c44b34c977dd109e936dd41ab81031.zip tcl-f47d1b8393c44b34c977dd109e936dd41ab81031.tar.gz tcl-f47d1b8393c44b34c977dd109e936dd41ab81031.tar.bz2 |
More examples
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) |