Reply To: Target Reading times (priming task)

PennController for IBEX Forums Support Target Reading times (priming task) Reply To: Target Reading times (priming task)

#7769
Jeremy
Keymaster

Yes, you could use a global Var element to compute the time difference between two timepoints in your sequence of in-trial commands on the fly, and report it as an extra column using newTrial().log():

newTrial(
  newVar("RT").global().set(()=>Date.now())
  ,
  newText("Hello world").print()
  ,
  newKey("FJ").wait()
  ,
  getVar("RT").set(v=>Date.now()-v)
)
.log("RT", getVar("RT"))

Jeremy