psychopy.org | Reference | Downloads | Github

Easiest way to measure that 2 min has passed

Hi all,

I’m putting together an experiment that presents a thought probe roughly every 2 minutes (with some pseudo randomization). Since the trial length is variable I really have to measure the actual time.

What’s the easiest way to do this in builder?

Many thanks for any ideas,
Amir

Ok, got a solution:

time_since_last_tp = globalClock.getTime() - time_of_last_tp

if time_since_last_tp > 120:
    stuff_happens()

time_of_last_tp = globalClock.getTime()