The clock command has facilities for getting the current time, formatting time values, and scanning printed time strings to get an integer time value. The clock command was added in Tcl 7.5. Table 13-1 summarizes the clock command:
|clock clicks||A system-dependent high resolution counter.|
|clock format value ?-format str?||Formats a clock value according to str.|
|clock scan string ?-base clock? ?-gmt boolean?||Parses date string and return seconds value. The clock value determines the date.|
|clock seconds||Returns the current time in seconds.|
The following command prints the current time:
clock format [clock seconds] => Sun Nov 24 14:57:04 1996
The clock seconds command returns the current time, in seconds ...