I want to calculate the time taken

Microsoft Windows xp professional editio...
September 22, 2009 at 17:15:23
Specs: Windows XP
I want to calculate the time taken for executing a batch file.
....
For Example i have a batch file execute.bat
In side that i have

One more batch file called services.bat

Now I want to calculate the time taken to execute the services.bat

Some thing like this..
Starting time

services.bat

End Time
Total Time taken = End time - start time

Please help me.

Regards

Gaurav Bedi


See More: I want to calculate the time taken

Report •


#1
September 22, 2009 at 19:28:21
The same question was already managed in this forum.
Solution is here:
http://www.computing.net/answers/pr...

Report •

#2
September 22, 2009 at 19:29:57
You're more than half-way there...

set start_time=%time%

call Services.bat

set end-time=%time%

Now calculate end_time - start_time using base 100 for the milli-secs, base 60 for seconds, base 60 for minutes and base 24 for hours (or base 12 if you use am and pm)


Report •

#3
September 22, 2009 at 21:12:58
This has been discussed on this forum before. Depending on the resolution you require, WMI might be what you're looking for.

Report •

Related Solutions

#4
September 23, 2009 at 16:46:20
If possible then please help me with the exact codes. Because I am completly new to scripting.

Regards,
Gaurav Bedi


Report •

#5
September 23, 2009 at 20:56:39
If possible then please help me with the exact codes. Because I am completly new to scripting.

If someone gives you the codings you will never learn scripting. Please have a go and come back for any clarifications you might need. A good starting point would be to study the script at the link posted by Ricardo647 in Response #1


Report •


Ask Question