SantiagoMeCer:
Someone told me that I can use one interruption instead of two. In that way, somehow I measure the time that the input has been pulsed and when it goes down I do the interruption. So basically I read the time that is high without any interruption and when it goes down I act on the system using an interruption and knowing the time it has been high (because my response will be proportional to this pulse length).
You should probably ask the person who told you that.
I think it can be done by using the Input Capture Register of Timer1. You can set the ICR to capture the Timer1 count at the instant the signal goes high. Then you use one interrupt when the signal goes LOW. Subtract the ICR value from the current count in Timer1 to get the number of timer ticks between the ICR triggering (signal goes HIGH) and the interrupt (signal goes low). Calculate time from the timer tick count and the duration of each timer tick.