in reply to simple timeout

Not sure how useful it is for your specific situation, but I've had excellent results with the Win32::Job module (requires Windows 2000 or later). A simple example of using this module can be found here Re: Timing Windows commands.