Windows Service needs to wait, Thread.Sleep?

You can use a System.Threading. Timer to run your code every 60 seconds instead of doing it in a sleeping thread.

Use a Timer to fire the process every 60 seconds rather than force the process to sleep.

It depends on what you want to do. If you want a (more) exact method you may want to use System.Threading.Timer. One thing about thread.

Sleep is that it really is "sleepatleastuntil...". The processor will ignore your thread until the sleep time is past. The next time it would give your thread priority, after the sleep time is past, it will.

This will normally be very close to the desired interval, but could be longer. Don't yield unless you really intend to yield.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions