How to set a timer interrupt

I need a way to set a timer interrupt on an Uno R3. That is, after x second/milliseconds/whatever I need an interrupt to trigger. I've done a forum search, and there are posts that seem to make reference to timer interrupts, but I can't find the code to do it.

The Delay function won't work in my context (basically my code will be running along receiving inputs. If it doesn't receive an input after x time expires, I need to output something and then start receiving inputs again).

Is a timer interrupt available? Thanks.

Check out the following documentation on the Watchdog Timer which I think would serve your purpose. They have examples too.
http://forum.arduino.cc/index.php/topic,63651.0.html

Good information here:

And also here:

There are also libraries to help set up timers. Usually though, it only requires a few lines of code, if you are comfortable dealing directly with the microcontroller's registers. The Atmel datasheet is also an important document to have.

I wonder if it would be sufficient to use millis() with the technique in the Blink Without Delay example sketch and in the demo several things at a time.

That is how I would implement a timeout. It would be much easier to debug and to modify.

...R

The Watchdog timer interrupt is perfect - exactly what I was looking for.

I continue to be impressed by the device and the environment. And the amount of information out there once you know where to find it.

Thanks to all.