Stop R estimation after given time <p>I would like to constrain the time of estimation to be performed in R. For example, I would like to stop running estimation of a GARCH model (by function <code>ugarchfit</code> from package <code>rugarch</code>) after 10 seconds if it has not finished by that time. This is just one example, and I would be interested in a general way to instruct R to stop whatever function which has been running as long as a chosen time limit. Thank you!</p>