Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a built in command in windows similar to the time command?

I am looking for a way to measure how long it takes certain taks to run, and would like to use something more accurate than a stopwatch.

share|improve this question

There is a program called timeit.exe included as part of the Windows 2003 Resource Kit, which is a free download (and works fine on Win7, FWIW).

There are lots of complicated options for dealing with timing databases and such, but the "-s" option skips all that and just reports the time at the end:

timeit -s command

If you need to stick strictly to the built-in commands, I think you'd have to create a batch file with the following and compute the time-difference yourself (which is possible to do in the batch file itself, but overly complicated):

echo %DATE% %TIME%
echo %DATE% %TIME%
share|improve this answer

You can use the Get-Date cmdlet in Powershell, but if you're after millisecond precision then this cmdlet isn't gonna do any good, since it returns a date and current time down to seconds.

share|improve this answer
Out of curiosity, how would you use that to measure program start time? Still trying to learn PS atm... – user48869 Sep 24 '10 at 18:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.