I have a Windows Service with the timer - every 15 seconds I'm calling a function. I need to add some logic to tell the timer to "wait" until the function is done executing its code (which can exceed 15 seconds) because I don't wait the timer to "hit" the function while it's still executing. What I'm planning to do is in my OnElapsedTime(), I'll stop the timer, execute my code and then start the timer again. Is this an efficient way of doing things? Or there's a better way to accomplish what I want?
Thank you for any responses.
Thank you for any responses.