Countdown timer on screen before continuing #1690
Replies: 1 comment 2 replies
-
Thanks for this useful snippet, @jodeleeuw! I'm using this to give participants a break every X trials, and to enforce a mandatory break of 10s. After the first countdown ends, I'm running into a problem where every 250ms, the console prints the following error message: My best guess is that, for whatever reason, the function is still being called even after the interval is cleared – and so Functionally, I don't think it matters all that much – maybe(?) there could be some performance issues over a long enough period of time, since there's so much being printed to the console? I'm not a javascript developer by any stretch of the imagination, so I couldn't say with any degree of certainty. My code is pasted below. I've tried setting Any sort of insight would be greatly appreciated. Thanks!
|
Beta Was this translation helpful? Give feedback.
-
I recently put together a trial for someone where a countdown was needed before continuing to the next part of the experiment. I thought it would be useful to archive the code here.
You can try the experiment at: https://l9hdbueap4.cognition.run/
Beta Was this translation helpful? Give feedback.
All reactions