Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
repeatable timer in python
def repeatable_timer(delay, func, args=[], kwargs={}):
func(*args, **kwargs)
t = Timer(delay, repeatable_timer, [delay, func, args, kwargs])
def hello(ar):
print("Hello %s!" % ar)
repeatable_timer(1, hello, ["World"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment