How to calculate intervals and execute an action at the specified time?

Yes. I have no issue making the servo rotate..

My issue is more on how to write the code to make the interval and to add it to the input time by the user..