I am running a C++ program and want to know how much time it takes. I can do it with in-built functions in the header files time.h and Windows.h but I want to use something like “time” command in UNIX. The reason is because my program is redirecting the output to a text file which is 750 MB and I am in no mood of trying to open it. How can that be done in Windows 7 (DOS prompt).
Thanks
Varun
You can capturing the time before and after using
echo %TIME%, or there are some free utilities for this purpose. For example, check out the stopwatch program from this link. It only has accuracy down to the second, unfortunately,http://www.jfitz.com/dos/index.html
Also refer to this similar question. There are some good solutions in here including a batch file that uses
set /Ato parseecho %TIME%,Print time in a batch file (milliseconds)