This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


Updated In 6 Graphic
TimeConstrained[expr, t]
evaluates expr, stopping after t seconds.
TimeConstrained[expr, t, failexpr]
returns failexpr if the time constraint is not met.
  • TimeConstrained generates an interrupt to abort the evaluation of expr if the evaluation is not completed within the specified time.
  • TimeConstrained may give different results on different occasions within a single session, for example as a result of different conditions of internal system caches.
  • TimeConstrained takes account only of CPU time spent inside the main Mathematica kernel process; it does not include additional threads or processes.
New in 1 | Last modified in 6