summaryrefslogtreecommitdiffstats
path: root/doc/time.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-10-27 14:43:09 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-10-27 14:43:09 (GMT)
commit4955bdc67b8a5c3d9d12cf70cfe0b73c8a4f4ca8 (patch)
tree7a733c8f49dc66ae55cca35e7652f5bb0b1c51c6 /doc/time.n
parent45beb64f7dcb09a6ce83532702bca760f72e6f4d (diff)
downloadtcl-4955bdc67b8a5c3d9d12cf70cfe0b73c8a4f4ca8.zip
tcl-4955bdc67b8a5c3d9d12cf70cfe0b73c8a4f4ca8.tar.gz
tcl-4955bdc67b8a5c3d9d12cf70cfe0b73c8a4f4ca8.tar.bz2
Finished user-level documentation backport
Diffstat (limited to 'doc/time.n')
-rw-r--r--doc/time.n12
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/time.n b/doc/time.n
index 11d123f..8eeab73 100644
--- a/doc/time.n
+++ b/doc/time.n
@@ -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)