Negative timestamps inaccurate

Hello everybody,

I’m programming an MRI experiment in which subjects are instructed to respond only within a given time window. If they respond too early, the trial has to be excluded from MRI analysis but the response shall still be recorded and used for behavioral analysis.

To achieve this, I want to call event.clearEvents() when the stimulus display is flipped onto the screen but reset() the clock only later when the response window begins. Thereby, when calling event.getKeys(keyList=responseMap.keys(), timeStamped=clock), I was hoping to get negative timestamps for premature responses and positive for valid ones.
This works so far except that negative timestamps don’t seem to be in seconds but always at value -0.20something. I would expect that a response 1 second before clock.reset() results in a timestamp of -1 but this is clearly not the case. I used a metronome to tap a response key every half of a second (120 bpm) and this is what the timestamps looked like:

-0.20690250000916421
-0.20641140011139214
-0.2060023001395166
-0.20561850001104176
-0.20523970015347004
-0.20486619998700917
-0.20448940014466643
-0.20411409996449947
0.22202409990131855
0.7185475998558104
1.2220489999745041
1.7026151998434216

It seems like for negative timestamps t, I have to calculate something like (t + 0.204) * 1000 to convert it to seconds. But still then negative values are rather spaced by 400 ms than 500 ms (i.e. 150 bpm) while the spacing for positive values looks fine. Any idea why this happens?

Thank you in advance!
Mario

Oops. I found the solution: I used the imprecise version of core.wait :smiley:
Everything works as expected.