Copyright (c) 1993 The Regents of the University of California.
Copyright (c) 1994-1996 Sun Microsystems, Inc.

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.18.1 2004/10/27 14:43:14 dkf Exp $

.so man.macros
time n "" Tcl "Tcl Built-In Commands"
S Note: do not modify the .SH NAME line immediately below!
NAME
time - Time the execution of a script
SYNOPSIS
time script ?count? E
DESCRIPTION

This command will call the Tcl interpreter count times to evaluate script (or once if count isn't specified). It will then return a string of the form .CS 503 microseconds per iteration .CE which indicates the average amount of time required per iteration, in microseconds. Time is measured in elapsed time, not CPU time.

EXAMPLE
Estimate how long it takes for a simple Tcl for loop to count to a thousand: .CS time { for {set i 0} {$i<1000} {incr i} { # empty body } } .CE
"SEE ALSO"
clock(n)
KEYWORDS
script, time