execute a function every n seconds python

37

import threading

def printit():
  threading.Timer(5.0, printit).start()
  print "Hello, World!"

printit()

# continue with the rest of your code

Comments

Submit
0 Comments