I am planning on creating a “long” experiment. By long experiment, I mean that there would be only one trial, but it may take about 30 minutes for the participants to finish this task.
If I read the documentation right, there is a “timer” option to limit the time that the participant can spend on this trial.
I am wondering whether it is possible to display on the screen the time that was spent since the beginning of the trial. The idea behind is that I wish the participants can easily monitor themselves about the time they spend on this trial.
Thank you in advance for your response. Please tell me if I need to clarify anything!
This is a sample code that illustrates what are you looking for:
PennController.ResetPrefix(null) // Keep here
// Transform the Var element into an appropriately formatted string
// Relaunch the timer to update again in 1s
).start() // Don't forget to start the timer the initially
getVar("finishTime").set(v=>Date.now()) // This will effectively stop the countdown
.success( newText("You clicked in time!").print() )
.failure( newText("You were too late").print() )
Hope it helps!
This reply was modified 2 years, 6 months ago by amilam.