Yes, I saw it....but I have to check every minute if the result of that function equals the time i set (5 minutes i told before). The other idea that came to my mind is to make a timer that increases itself then if key is pressed gets its counter to 0, and when the timer count equals the time I set, the actions to be done. Maybe these are the only two possibilities. Which is better having in mind speed and battery discharging? Thanks !