As you can see in the code, the loop() event is empty – no need to check for the elapsed time and call a function if the minimum delay has passed: the timer does it all. The one thing you have to be ...
import time from clean_loop_timer import LoopTimer loop_timer = LoopTimer() for i in range(100): with loop_timer.add_section_timer("test"): if i < 3: time.sleep(1.0) else: time.sleep(0.1) with ...
Here’s what a typical loop looks like over roughly 2 hours ... For example, if I’m in the middle of a writing groove and my timer goes off signaling a break, sometimes I’ll just restart ...