View Single Post
  #3  
Old 03-18-2011, 09:45 AM
fivel_lab fivel_lab is offline
Member
 
Join Date: Mar 2011
Posts: 36
i didn't have yield statements. i started out using vizact.ontimer within the while-loop to implement an elapsed time function :
startTime = viz.tick()

def elapsed():
elapsedTime = viz.tick()-startTime

vizact.ontimer(0, elapsed)

i wanted to use 'elapsed' to monitor each trials time and set isDone to True when the time hit 20 seconds. the partner i am working with pointed out that the preceeding script wouldn't create a timer at the start of the while loop like i had intended but would instead create timerS nonstop once the while loop began. as a result, i think i created a massive memory leak...

how would i go about implementing a yield statement to get an elapsed time function?
Reply With Quote