Created
December 9, 2014 16:37
-
-
Save TechplexEngineer/b1d3e89164df86cc915d to your computer and use it in GitHub Desktop.
Python setInterval From http://stackoverflow.com/questions/2697039/python-equivalent-of-setinterval
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment