I’ve found this way to solve my problem, but still wat to hear about blender Timer.
import threading
# "constant" that we can toggle if we want to run or not.
CONTINUE = 0
def hello():
global CONTINUE
print("hello, world")
if CONTINUE:
# Create a timer object that will call the function hello after 10 seconds.
t = threading.Timer(2.0, hello)
# Start the timer.
t.start()
hello()
I would not use the threading module with bpy, you might get some strange results. To stop a blender timer from firing, just return None when you’re done with it, as described in the documentation