如果使用的是Windows 2003(请注意,Windows Server 2008及更高版本不受支持),则可以使用Windows Server 2003资源工具包,该工具包包含显示详细执行状态的timeit.exe。下面是一个例子,为命令“timeit-?”计时:C:\>timeit timeit -?Invalid switch -?Usage: TIMEIT [-f filename] [-a] [-c] [-i] [-d] [-s] [-t] [-k keyname | -r keyname] [-m mask] [commandline...]where: -f specifies the name of the database file where TIMEIT keeps a history of previous timings. Default is .\timeit.dat -k specifies the keyname to use for this timing run -r specifies the keyname to remove from the database. If keyname is followed by a comma and a number then it will remove the slowest (positive number) or fastest (negative) times for that keyname. -a specifies that timeit should display average of all timings for the specified key. -i specifies to ignore non-zero return codes from program -d specifies to show detail for average -s specifies to suppress system wide counters -t specifies to tabular output -c specifies to force a resort of the data base -m specifies the processor affinity maskVersion Number: Windows NT 5.2 (Build 3790)Exit Time: 7:38 am, Wednesday, April 15 2009Elapsed Time: 0:00:00.000Process Time: 0:00:00.015System Calls: 731Context Switches: 299Page Faults: 515Bytes Read: 0Bytes Written: 0Bytes Other: 298您可以在Windows 2003资源工具包中获取TimeIt。下载这里.