How would I program a script to proceed to a function, if an if statement takes far too long to complete?
I am currently in a situation, where a chunk of code (depending on the network) can take anywhere from half a second, to half an hour to complete, and I am researching a code patch which would cause the code to skip the if statement and proceed to a new code function if it takes over 10 seconds to complete.
I suspect that the answer may lie within threads, however I am unsure as its a programming concept with which I have no experience. I am open to any answers, no matter how elaborate.