Making a python script run at a set rate.

Posted by Matt1024 on Stack Overflow See other posts from Stack Overflow or by Matt1024
Published on 2010-04-14T19:32:55Z Indexed on 2010/04/14 19:53 UTC
Read the original article Hit count: 179

Filed under:
|

How can I make a python loop run at a set rate regardless of how long it takes to execute commands in the loop (providing the commands take less time to run than the loop is allowed)?

How can I make this run every 0.25 seconds, for example?

while True:
    print("OK")

© Stack Overflow or respective owner

Related posts about python

Related posts about loop