Re: timing a program on Windows
From: Herman D. Knoble (SkipKnobleLESS_at_SPAMpsu.edu)
Date: 02/22/04
- Previous message: Ken Plotkin: "Re: timing a program on Windows"
- In reply to: beliavsky_at_aol.com: "timing a program on Windows"
- Next in thread: glen herrmannsfeldt: "Re: timing a program on Windows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 22 Feb 2004 15:07:27 -0500
B:
There is a utility named TimeThis.exe that will run under Windows
NT/2000/XP and I presume 2000 Server and 2003 Server. It works
for most any .EXE including Fortran .EXE's. Download it at:
http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/timethis-o.asp
As you mention, you can get wall clock time via a .BAT file like:
echo off
rem Set the prompt to the time of day.
prompt $t$g
if exist %1.BAT GOTO CALLIT
echo on
%1 %2 %3 %4 %5 %6 %7 %8 %9
echo off
GOTO WRAPUP
:CALLIT
echo on
CALL %1 %2 %3 %4 %5 %6 %7 %8 %9
echo off
:WRAPUP
rem Restore the usual prompt.
prompt $p$g
Skip Knoble, Penn State
On 21 Feb 2004 17:21:35 -0800, beliavsky@aol.com wrote:
-|I have wondered how to time an executable from the command line on
-|Windows -- there is no built-in command. Recently I provided a batch
-|file hack to do this, but it's a hack. The Windows Server 2003
-|Resource Kit, which can be downloaded free from the Microsoft web site
-|(the file is rktools.exe), is also supported on XP. There are two
-|commands for timing programs, ntimer.exe and timeit.exe. They both
-|agree closely with the results I get from using the Fortran 95
-|intrinsic SYSTEM_CLOCK.
-|
-|For example, typing 'ntimer -1 foo.exe' at the command line, where
-|foo.exe is a Fortran executable that prints the time taken at the end,
-|gave me the output
-|
-| time elapsed (s) = 103.2040
-| 0:01:43.234 0:01:42.093 0:00:00.812 0:00:00.000
-|
-|The four times shown by ntimer are the elapsed, kernel, user, and idle
-|time. The measured elapsed times, 103.204 and 103.234 seconds, agree
-|closely, and the latter includes the time taken by the final print
-|statement.
-|
-|An operating system designed for programmers would have ntimer.exe
-|built-in, rather than something you need to download.
Herman D. (Skip) Knoble, Research Associate
(a computing professional for 38 years)
Email: SkipKnobleLESS@SPAMpsu.edu
Web: http://www.personal.psu.edu/hdk
Penn State Information Technology Services
Academic Services and Emerging Technologies
Graduate Education and Research Services
Penn State University
214C Computer Building
University Park, PA 16802-21013
Phone:+1 814 865-0818 Fax:+1 814 863-7049
- Previous message: Ken Plotkin: "Re: timing a program on Windows"
- In reply to: beliavsky_at_aol.com: "timing a program on Windows"
- Next in thread: glen herrmannsfeldt: "Re: timing a program on Windows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|