Skip to content

Instantly share code, notes, and snippets.

@dirkk0
Created February 27, 2012 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dirkk0/1921907 to your computer and use it in GitHub Desktop.
Save dirkk0/1921907 to your computer and use it in GitHub Desktop.
import threading
batch = "t1 t2 t3 t4".split()
def advanceCue():
if batch:
print batch.pop()
# for i in (1,2,3,4):
# advanceCue()
def processCue():
global t
advanceCue()
if batch:
t = threading.Timer(1.0, processCue)
t.start()
def startCue():
t = threading.Timer(1.0, processCue)
t.start()
startCue()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment