Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • a) did you try timeout 5s /usr/bin/time -f \"TIME: %e\" python3 test.py ? b) execution time of timeout command would be very small. Commented Jun 5, 2023 at 13:02
  • @Archemar then timeout is set upon time and python3 command as a whole, which doesn't truly set timeout on python3 execution only! Although timeout execution is very small but I want to set timeout and time only for python3 command, not any command pipeline. Commented Jun 5, 2023 at 13:10
  • I don't think this is going to work. You will either timeout the time along with python or time the timeout along w/ python. Having both apply to ONLY python looks impossible to me. Commented Jun 7, 2023 at 2:34