Skip to content
Discussion options

You must be logged in to vote

Hi @rMinion, the reason your setTimeout callback isn't running after a key press is because you're using the jsPsych.pluginAPI.setTimeout function, which registers the timer in the core jsPsych code so that it can be easily cleared at the end of a trial with jsPsych.pluginAPI.clearAllTimeouts. The html-keyboard-response plugin happens to call jsPsych.pluginAPI.clearAllTimeouts when the trial ends, which is also clearing your global timer (line 83). Using the jsPsych.plulginAPI.setTimeout function is generally recommended so that it can be easily cleared, because timers should almost always be cleared at the end of a trial (otherwise it will continue running during the next trial, which is…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rMinion
Comment options

Answer selected by rMinion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants