Mathematica 9 is now available

Documentation / Mathematica / Built-in Functions / System Interface / Time and Date /

TimeConstrained

FilledSmallSquare TimeConstrained[expr, t] evaluates expr, stopping after t seconds.

FilledSmallSquare TimeConstrained[expr, t, failexpr] returns failexpr if the time constraint is not met.

FilledSmallSquare TimeConstrained generates an interrupt to abort the evaluation of expr if the evaluation is not completed within the specified time.

FilledSmallSquare TimeConstrained evaluates failexpr only if the evaluation is aborted.

FilledSmallSquare TimeConstrained returns $Aborted if the evaluation is aborted and no failexpr is specified.

FilledSmallSquare TimeConstrained is accurate only down to a granularity of at least $TimeUnit seconds.

FilledSmallSquare Aborts generated by TimeConstrained are treated just like those generated by Abort, and can thus be overruled by AbortProtect.

FilledSmallSquare See Section 2.14.3.

FilledSmallSquare See also: MemoryConstrained, AbsoluteTiming, Timing, $IterationLimit, $RecursionLimit, Pause, Abort, TimeConstraint.

FilledSmallSquare New in Version 1.

Further Examples



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.