The code needs to be revised in line with this post re the visual stimuli:
But re the timing, it is much simpler than you are trying here. Builder maintains a time variable called t
which starts at 0
at the beginning of each routine. So just do this:
thisExp.addData('RT', t)
The reason your timing can’t work is you are creating a clock object almost immediately before you ask it for its time, so it will always give you an answer very close to zero. You need to create a clock just once, in advance, and then reset it at the moment you want to start timing from (again, just the once). But Builder is already doing this for you, so just use that.