Skip to content

Instantly share code, notes, and snippets.

@adimania
Created December 18, 2016 15:12
Show Gist options
  • Save adimania/1918d5c56ab12f077ae8584c1408a42c to your computer and use it in GitHub Desktop.
Save adimania/1918d5c56ab12f077ae8584c1408a42c to your computer and use it in GitHub Desktop.
running something every 10 seconds.
import datetime
import threading
import time
def d():
t=threading.Timer(10.0,d)
t.start()
time.sleep(2)
print datetime.datetime.now()
d()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment