Timed Operation
i need to run a command and stop the command if its running too long, is this possible??
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Roei BarPosted Aug 20, 2009, 3:29 AM
this code will run a method as you want in a different Thread while keeping the main in block till expiration time elapsed
to run it you do the following :
of course you will need to change the params as needed :-)
dont forget to mark this as "Accepted Answer"