Skip to content

Instantly share code, notes, and snippets.

@stamat
Created April 12, 2013 10:50
Show Gist options
  • Save stamat/5371218 to your computer and use it in GitHub Desktop.
Save stamat/5371218 to your computer and use it in GitHub Desktop.
Python setInterval() equivalent
import threading
def set_interval(func, sec):
def func_wrapper():
set_interval(func, sec)
func()
t = threading.Timer(sec, func_wrapper)
t.start()
return t
@anchikhorov
Copy link

this not will work as expected, it python no such analog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment