I have a service that should fire an event every 10 minutes. I originally placed a timer in the service but it's functionality was VERY flaky in that sometimes it would fire, but most of the time it would not.
So, I put a do loop in the service that basically said "initially set a start time, loop until datediff function indicates 10 minutes has passed, fire the event, reset the start time, and start over."
Now my problem is that this service, when it's running, is eating up CPU cycles, constantly running 97-99%. I tried a System.Threading.Thread.Sleep command but this did not change the performance of the service (it still ate up my CPU cycles).
Is there anything else I can try???
So, I put a do loop in the service that basically said "initially set a start time, loop until datediff function indicates 10 minutes has passed, fire the event, reset the start time, and start over."
Now my problem is that this service, when it's running, is eating up CPU cycles, constantly running 97-99%. I tried a System.Threading.Thread.Sleep command but this did not change the performance of the service (it still ate up my CPU cycles).
Is there anything else I can try???