PDA

View Full Version : running an executable for a specific time period


Saz
03-02-2009, 06:06 AM
Hi there,
I've got an executable of my program that performs a number of different operations and eventually outputs data to a file. How would I go about inserting code into the program so that the file runs for 30 secs and then stops automatically. I can do it so that the data collection only lasts for 30 secs but would like something a little more elegant and automated

Thanks!

farshizzo
03-02-2009, 09:26 AM
The following code will execute the viz.quit command after 30 seconds:import vizact
vizact.ontimer(30,viz.quit)

Saz
03-03-2009, 01:37 AM
Thank you - you're a star!