python run function every x seconds without sleep code example
Example: run every minute python
from time import time, sleep
while True:
sleep(60 - time() % 60)
# thing to run
from time import time, sleep
while True:
sleep(60 - time() % 60)
# thing to run