Thank you very much, your advice and example helped! I changed the scheme a little so that I could accurately set the time of the period and the delay in seconds.