felix_fetche:
Cannot "" timers/interrupt library in my project. Maybe i have to add the library first?
That's not very clear. You'd need to provide more details about this library.
But I agree with UKHeliBob that you should consider how this can be done without use of interrupts. They have their uses but can also add unnecessary complexity.