Python execute a function for X seconds

Posted by theactiveactor on Stack Overflow See other posts from Stack Overflow or by theactiveactor
Published on 2010-06-13T16:30:08Z Indexed on 2010/06/13 16:52 UTC
Read the original article Hit count: 146

Filed under:

I'm looking for a way for a function to take actions based on how long it has been executing. For example, my function would loop continuously until 5 seconds has elapsed, in which case it returns immediately. Any suggestions?

© Stack Overflow or respective owner

Related posts about python