Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

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

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • 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 variable time_sequence will be accessed with var.time_sequence.

    Does that make sense?

    Eduard

Sign In or Register to comment.