PennController for IBEX › Forums › Support › No reading times on results file › Reply To: No reading times on results file
July 24, 2020 at 9:41 am
#5859
Keymaster
You can get plain RT using a global Var element in which you compute the time difference, like this:
newTrial("experimento",
newText("*")
.print()
,
newKey(" ")
.wait()
.log("all")
.disable()
,
getText("*")
.remove()
,
newText(variable.oracion)
.print()
,
newVar("RT")
.global()
.set(v=>Date.now())
,
newKey(" ")
.wait()
.log("all")
,
getVar("RT")
.set(v=>Date.now()-v)
,
getText(variable.oracion)
.remove()
)
.log( "ReadingTime" , getVar("RT") )
The timestamps correspond to the number of milliseconds that have elapsed since January 1, 1970. They tell you when the event happened (e.g. 1595564332806 corresponds to July 24, 2020, 9:38am GMT-0400) but are most useful for subtraction, like we’re doing here. The expression Date.now() in the script above returns such timestamps.
Jeremy