Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python to run another code on timer while a separate code runs

import threading

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

printit()

# continue with the rest of your code
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #run #code #timer #separate #code #runs
ADD COMMENT
Topic
Name
1+2 =