EVOLUTION-MANAGER
Edit File: setTimeLimit.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Set CPU and/or Elapsed Time Limits</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for setTimeLimit {base}"><tr><td>setTimeLimit {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Set CPU and/or Elapsed Time Limits</h2> <h3>Description</h3> <p>Functions to set CPU and/or elapsed time limits for top-level computations or the current session. </p> <h3>Usage</h3> <pre> setTimeLimit(cpu = Inf, elapsed = Inf, transient = FALSE) setSessionTimeLimit(cpu = Inf, elapsed = Inf) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>cpu, elapsed</code></td> <td> <p>double (of length one). Set a limit on the total or elapsed cpu time in seconds, respectively.</p> </td></tr> <tr valign="top"><td><code>transient</code></td> <td> <p>logical. If <code>TRUE</code>, the limits apply only to the rest of the current computation.</p> </td></tr> </table> <h3>Details</h3> <p><code>setTimeLimit</code> sets limits which apply to each top-level computation, that is a command line (including any continuation lines) entered at the console or from a file. If it is called from within a computation the limits apply to the rest of the computation and (unless <code>transient = TRUE</code>) to subsequent top-level computations. </p> <p><code>setSessionTimeLimit</code> sets limits for the rest of the session. Once a session limit is reached it is reset to <code>Inf</code>. </p> <p>Setting any limit has a small overhead – well under 1% on the systems measured. </p> <p>Time limits are checked whenever a user interrupt could occur. This will happen frequently in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code and during <code><a href="Sys.sleep.html">Sys.sleep</a></code>, but only at points in compiled C and Fortran code identified by the code author. </p> <p>‘Total cpu time’ includes that used by child processes where the latter is reported. </p> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>