Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
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
© 2008 Wolfram Research, Inc. japanese.gif
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team