Re: A special (?) type of timer

Tech-Archive recommends: Fix windows errors by optimizing your registry



"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?



.



Relevant Pages

  • Re: YASD: Another final level death
    ... > my character was YetAnotherDeadCharacter. ... Thats a mistak you only make once... ... or twice. ...
    (rec.games.roguelike.adom)
  • Re: One less nutter....
    ... Thats my story anyway. ... I probably toot someone about twice a year. ... Prev by Date: ...
    (uk.rec.driving)
  • Re: Advice on uC selection wanted - driving microsteppers etc
    ... Thats more than I budgeted for and at 96 MHz is about twice the speed I ... able to accelerate the motors with only DMA intevention. ... race through straight-line code, but the branch logic is awful. ...
    (comp.arch.embedded)
  • Re: Finding Row Numbers Within the RangeName
    ... Thats fine, I found you could alter the search by columns or row, so thats ... "A good example is twice the value of good advice." ... "Goofy" wrote: ...
    (microsoft.public.excel.programming)