I want to make a redstone device that prevents an input from turning on, then off, then on again very rapidly. For example, if a player turns a lever on, it should update instantly. However, if they turn it off, then turn it on again, the machine should stay off for a few moments before it turns back on. To put it another way, there should be a forced minimum delay between turning a device off then on, but no delay between turning the device on then off. Also, if the user turns the device off, waits the delay, then turns it on, the device should update instantaneously.
I have tried various approaches to this problem, and I assume I will have to use some kind of RS NOR Latch in combination with a series of repeaters for the delay, but I can't get it to function quite right. What's the best way to do this?