I'm making a map where players have to stand on a pressure plate for three seconds before the dragon is spawned. Is there a way to make it so the only way to output a signal is when you stand on the pressure plate for three seconds in a row?
You can use this contraption, where the output is the redstone torch on the right.
But make sure the hoppers face into each other!
How does it work? In the default state the hopper with the items in it is locked, so the items stay in it. When you step on the pressure plate the front hopper gets unlocked and the back one locked, so items start flowing out of the front one. Once the front hopper is empty (after about 3 seconds) the comparator turns off, allowing the redstone torch to turn on.
A way to do this which could be easily edited if your need change in the future would be to have a circuit connected to the pressure plate where. If the plate is off it runs a fast clock resetting a scoreboard variable to 0. If the plate is on it runs a one second clock (10 redstone ticks) which increases the value of the scoreboard variable by one.
When the variable is equal to 3 the dragon spawns.
Here is a screenshot:
The contraption above will output a signal (power the command block) only when all torches from the upper part are off. All the torches will be off only when all the repeaters are on, and they are on only when you step on the pressure plate for 3 seconds exactly (7 repeaters on maximum, 0.4 second delay, one on half delay - preferably the first).
For extra precision, you can place more repeaters with smaller delays, so even when you step off for a small fraction of a second, you will have to start again:
The screenshot above shows a redundant way of doing this, though the upgraded version of it looks good:
Your main problem here are not the Repeater delays, but the pressure plate delay - it stops sending signal a bit later then you step off of it.
Use an AND gate with the following configuration: output signal spawns the dragon (right); 2 input signals: one from the pressure plate (lower left), another from the pressure plate, but delayed by 3 seconds using several repeaters (upper left). The output will only be turned on if the pressure plate is currently pressed and was pressed 3 seconds ago too.