Answer the question
In order to leave comments, you need to log in
What is the correct way to loop over time?
There is an infinite while loop.
You need to run it after n-th time.
time.sleep() - Sleeps a process.
Answer the question
In order to leave comments, you need to log in
You have some kind of problem in your code. time.sleep should not lay. If you do not want to refactor, then it is better to remove the loop altogether and use cron, for example.
What are the arguments for time.sleep? It has the syntax
time.sleep(t) where t is the number of seconds
Take twisted and do it:
www.saltycrane.com/blog/2008/10/running-functions-...
Well, by the way, I recommend this framework, I work on it myself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question