I think the topic might not be accurate enough, but I really don't know how to describe it in a very brief way...
What I want to do is as follows: I have a process running some analysis (in Java) and trying to give a return value, but the whole analysis has a time constraint, say 10 seconds
If the analysis gives a result within 10s, return the result; else, times up when reaching 10s, stop the process and return a dummy value
I am a newbie in this field, any suggestions will be welcomed.