Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Evaluation Control >

TimeConstrained

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
© 2013 Wolfram Research, Inc. Japanese
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team