PDA

View Full Version : Timer thing in batch


Emon
11-24-2002, 01:25 PM
How would I make a timer thing in batch? I want to start a timer, run a series of commands, then when those are finished, print out how much time has passed. How would I do this?

Midget Basher
11-24-2002, 07:32 PM
The only way I could think of doing it is to have the first command in the batch file run a program that stores time since the system turned on in an environment variable and have the last command run another program that gets that variable from the environment and prints out the difference between now and then. As far as I know, there's no way to do it entirely in batch, you'd have to write the programs I mentioned earlier. I easily could be wrong though, that's be interesting if you could, butI've never seen any such functionality in any batch documentation I've ever seen.