interrupts with arduino?

Yep, you should be able to just stick the code in there. It can get tricky though, as the interrupt can, as its name suggests, interrupt any other bit of your code (meaning that if it, say, changes the value of a variable, that change could happen in the middle of some other line of code).