Le lundi 2 septembre 2019 13:46:15 UTC+2, Szabolcs Horvát a écrit : > > Does Sage have a feature to constrain computation time? Suppose > the function f() takes a long time to run. I am looking for a way to > run it *for at most 5 minutes*. If it finishes by then, I'd like to have > the return value from f(). If not, it should communicate that clearly, > and the system should be ready for the next computation. > > For those familiar with Mathematica, I am looking for something > similar to its TimeConstrained[] command. >
You could use `alarm`, see - Ask Sage question 7931 - Any way to timeout? https://ask.sagemath.org/question/7931 -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/bcc942bf-6621-4326-a37b-0cb1ce41547f%40googlegroups.com.