## Tcl8.6.17/Tk8.6.17 Documentation > Tcl Commands > time

### Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API

### NAME

time — 記述譜の実行時間 Time the execution of a script

### 構文 SYNOPSIS

time script ?count?

### 説明 DESCRIPTION

この命令は記述譜を評価するために Tcl 解釈実行機能を count 回(count が指定されていない場合は1回)呼出す｡次に次の形式の文字列を返す This command will call the Tcl interpreter count times to evaluate script (or once if count is not specified). It will then return a string of the form

    503.2 microseconds per iteration

これは､旅程当たりに必要とされる時間の平均の値を､百万分の一秒の 単位で指し示す｡ 時間は経過時間であり､ CPU時間 ではない｡ which indicates the average amount of time required per iteration, in microseconds. Time is measured in elapsed time, not CPU time.

### 用例 EXAMPLE

単純な Tcl for 巡回を千回迄数える為に如何に長くかかるかを見積もる: Estimate how long it takes for a simple Tcl for loop to count to a thousand:

    time {
        for {set i 0} {$i<1000} {incr i} {
            # 空の内容
            # empty body
        }
    }

### SEE ALSO

clock

### KEYWORDS

script, time
Copyright © 1993 The Regents of the University of California.
Copyright © 1994-1996 Sun Microsystems, Inc.