I'm trying to execute a portion of code within a specific number of seconds. If it fails, I need to break out and do something else. To give you an idea of what I mean, take a look at the pseudo code below:
try to complete the code below for 3 seconds {
do something that could take a long time. if it doesn't complete within 3 seconds, generate an error which will abort the processing of further instructions in this try
} catch (Exception $e) {
Execute some different commands since the code above didn't finish quickly enough.
}
Thank you for any help you can provide.
-Jon