Visible countdown per trial
Show a countdown that restarts on every trial, with the deadline itself enforced by the response window.
When to use it
Section titled “When to use it”When each trial has its own time budget, participants perform better if they can see it draining: a visible per-trial countdown turns an invisible deadline into steady, legible pressure. The naive approach of making the timer end the trial is the wrong tool here, since its skip behaviour jumps past whole blocks and is only checked about every half second. This recipe uses the timer purely as a display and leaves the actual deadline to responseWindow. For one shared clock over a whole section, use the Timed block with skip recipe instead.
Trial file
Section titled “Trial file”| type | stimFormat | title | content | stim1 | responseType | responseWindow | timer | key | button1 |
|---|---|---|---|---|---|---|---|---|---|
| instructions | Beat the clock | Work out the next number in each sequence and type it in. You have 15 seconds per puzzle; the countdown at the top turns red for the last 3 seconds. | NEXT | ||||||
| test | word | What comes next? 2, 4, 8, 16 | box | 15000 | a:15s,top,l,red last 3s | 32 | |||
| test | word | What comes next? 1, 4, 9, 16 | box | 15000 | b:15s,top,l,red last 3s | 25 | |||
| test | word | What comes next? 3, 6, 12, 24 | box | 15000 | a: | 48 | |||
| test | word | What comes next? 5, 10, 20, 40 | box | 15000 | b: | 80 | |||
| instructions | Done | That is the end of the puzzles. | NEXT |
type,stimFormat,title,content,stim1,responseType,responseWindow,timer,key,button1 instructions,,Beat the clock,Work out the next number in each sequence and type it in. You have 15 seconds per puzzle; the countdown at the top turns red for the last 3 seconds.,,,,,,NEXT test,word,,,"What comes next? 2, 4, 8, 16",box,15000,"a:15s,top,l,red last 3s",32, test,word,,,"What comes next? 1, 4, 9, 16",box,15000,"b:15s,top,l,red last 3s",25, test,word,,,"What comes next? 3, 6, 12, 24",box,15000,a:,48, test,word,,,"What comes next? 5, 10, 20, 40",box,15000,b:,80, instructions,,Done,That is the end of the puzzles.,,,,,,NEXT
How it works
Section titled “How it works”The restart comes from the labels. A timer label that repeats on consecutive trials keeps one clock running across them; it only starts or resets when the label changes between trials. Alternating a and b therefore forces a fresh 15 second countdown on every puzzle: each label is defined once with its duration and options (a:15s,top,l,red last 3s), and the later a: and b: cells are bare label references, the reference form the editor accepts, which restart the already-registered clock on re-entry. Keep labels letters-only, since a colon-less value keeps only its leading letters when read as a reference, and write durations with explicit s or m units; plain integers inside an option list are mangled unless they are exact multiples of 1000. The red last 3s warning needs a named colour, because hex codes containing the digits 7 to 9 are not recognised.
Note what the timer does not do: without skip, a countdown that reaches zero just sits at 00. The trial actually ends because responseWindow says so: 15000 opens the window when the puzzle appears and closes it 15 seconds later, recording timeout, or <partial>;timeout when the participant had already typed something into the box, and auto-advancing. Give both columns the same duration and the visible clock and the real deadline agree; the display refreshes about every half second anyway, so millisecond alignment is neither possible nor needed.
The closing instructions row has an empty timer cell on purpose: entering a timer-less trial after a timed one stops and clears the running clock.
Variations
Section titled “Variations”- Give puzzles different budgets by using one label per row (
a:15s,b:20s, and so on), with each row’sresponseWindowmatched to its own duration; the first definition of a label always wins, so a reused label cannot be re-timed. - Move or resize the clock with the position and size options:
bottomrightandxlmake a large corner display, and the default is small, top right. - Count up instead of down with the
stopwatchoption; it still needs a duration to stop against. - For one clock across a whole section that also ends it, use a single shared label with
skip(see the Timed block with skip recipe).