Re: A special (?) type of timer
- From: "Christof Nordiek" <cn@xxxxxxxxx>
- Date: Wed, 11 Oct 2006 15:15:03 +0200
"adi" <adrian.rotaru@xxxxxxxxxxx> schrieb im Newsbeitrag
news:1160565251.138066.130970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Of course one solution is to set the timer's interval to 1000 and
constantly check the time.
The System.Threading.Timer has a max. period of 4.294.967.294 ms
thats about 49 days, that should be suficcent.
It's twice the max. period of the API the article mentions.
This seems to me like "guessing" rather than going straight forward.
I also found a way to set a large interval to the timer:
This is not "guessing" but "polling" (= looking from time to time, if there
is something to do.
I guess, the task scheduler is doing something very similar.
If this is not precise enough, you could test, if the due time is within the
next period and then set the exact rest interval.
http://support.microsoft.com/default.aspx?scid=kb;en-us;180736
This seems to be a more professional way to solve the problem.
But still I hope there's another cool trick to solve this.
...or not?
.
- References:
- A special (?) type of timer
- From: adi
- Re: A special (?) type of timer
- From: adi
- A special (?) type of timer
- Prev by Date: Re: Bridge pattern? What is the use?
- Next by Date: Re: A special (?) type of timer
- Previous by thread: Re: A special (?) type of timer
- Next by thread: Re: A special (?) type of timer
- Index(es):
Relevant Pages
|