Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 clean windows port / version of the usr/bin/time command in Linux (program to time the execution of a process)?

share|improve this question
What feature of /usr/bin/time are you looking for on Windows, specifically? – EvilChookie Aug 28 '09 at 0:49
The ability to time my programs of course. – unknown Aug 28 '09 at 0:53
Your question assumes that people know what time actually does on Linux. Someone may not use Linux, but may know a Windows Alternative to what you're looking for (which is the ultimate goal of your question) - it would be helpful for those people to state what you're looking to achieve. – EvilChookie Aug 28 '09 at 1:40
I agree with EvilChookie. +1 now that I understand what you want. – Sasha Chedygov Aug 28 '09 at 3:15
Please see my answer for a link to timethis.exe which does what you want and is available as an approx 116K download. – Sinan Ünür Aug 28 '09 at 3:21
up vote 1 down vote accepted

Use timethis from the Win2K resource kit.

share|improve this answer
i don't like how it has to clear your terminal when you use it. – unknown Sep 3 '09 at 1:25
@unknown I have never observed timethis clearing the terminal. – Sinan Ünür Sep 24 '09 at 7:59

If you want time to use it as a benchmark utility, the Windows 2003 Resource Kit has Timeit.exe which does the same.

share|improve this answer
Cool, can I get it without getting everything else there? – unknown Aug 28 '09 at 0:44
Unfortunately that seems to be the only download Microsoft provides. But there are a lot of useful tools in there which I have renamed to their UNIX equivalent and dropped into my System32 folder for use from the command line. You can simply delete the ones which you don't want. – John T Aug 28 '09 at 0:50
John T, congrats on being first to 10k! Enjoy reading your posts... Don't know how you find the time as every time I am about to submit, you seem to have the same / slightly better answer! Here's to the next 10k!- Delete this after you have read it as there is no private message feature! (or write another commend then il delete it) – William Hilsum Aug 28 '09 at 1:59
@Wil, thanks! I cannot delete it and there is no need to. Comments are exactly that, comments. Good ones are rather appreciated :) – John T Aug 28 '09 at 5:18

You could always install Cygwin which will give you the UNIX time command. It is pretty useful to have Cygwin installed anyway.

By you asking for a clean port or version, I don't think Cygwin would be acceptable. The only thing I have found is this for custom code to compile on Windows. As I didn't find any links where this has been set up as the time command, I don't know that you could get this to work unless you wanted to program it yourself.

share|improve this answer

I have created a simple Windows program called timemem.exe that behaves similarly to /usr/bin/time on Linux/Mac OS X, and will show similar statistics, such as elapsed time, user and kernel CPU time, and maximum working set size in memory used by another Win32 process. See:

share|improve this answer

On my Mac, /usr/bin/time/ returns the system uptime.

On a Windows computer, you can use the following to return the uptime: net stats server

The 'Statistics Since' will give you the time the computer was last powered up. There's also a server tool - uptime.exe

There's more information at the Microsoft Support Site.

Of course, if you're not looking to find the uptime of a computer, I'm way off the mark. If you're not looking for uptime, what are you looking to achieve?

Edit: If you're looking for CPU time as suggested in a comment, you can use the tasklist command. Punch in tasklist /? at a command prompt and see the info about it.

share|improve this answer
I don't think he's looking for uptime. time on linux measures the real and cpu time for a process. – prestomation Aug 28 '09 at 0:38
@prestomation: Ah. Edited, adding something else that would help. – EvilChookie Aug 28 '09 at 0:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .