How to record time spent in different phases of a recursive loop
Hi!
I made an experiment in which participants can switch between two parts of information (two 'screens') by pressing the 'up' key. They can keep on switching until they finally make a decision (by pressing one of two other keys).
Now I want to record how much time they spend on each part of information until they make a choice. Ultimately I am interested in how much time they spent in total on each part of information.
My question is what is the best way to record this?
I am not sure what is the best way to explain my question,
but in case it helps, this screenshot shows the outline of this sequence:
The design of the solution I was thinking about:
Start by recording the time between each switch by storing a t1 - t0 calculation into a variable in both screen_first_script and screen_second_script. Then make a new t1-t0 variable each time those inline scripts are called (i.e. each time a switch is made). Then sum those variables up at the end, per screen.
If this is correct, what is the best way to let my script infinitely keep on producing new t1-t0 variables?
Or is there a better way to record the different amounts of time spent at each screen?
I hope my question makes sense!
Comments
Hi,
How exactly does your experiment work? That is, how/ where are they key presses collected, and how/ where is the flow of the experiment determined? Your solution seems fine, but I don't fully understand how your experiment works, so it's hard to say for sure.
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi,
I already implemented a way to record this, so the above question is solved for me!
I do have one other question though: How do I call the timestamp varaibles (the 'time_ ' variables that OpenSesame produces for a sketchpad), in inline scripts?
Hi,
Simply by precede them with a
var.
. So for example the variabletime_sequence
will be accessed withvar.time_sequence
.Does that make sense?
Eduard