Re: What's the best Timer to use

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



DaTurk,

What you want is the Timer class in the System.Timers class.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"DaTurk" <mmagdits@xxxxxxxxxxx> wrote in message
news:1175286093.627035.112120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

I'm creating an application that will need to use a timer to do a
static method call every second. My question, is what would be the
best timer to use? I know there are several, but I'd like to use a
timer that is probably the most reliable, and hopefully designed with
high performance in mind. Thank you in advance.



.



Relevant Pages

  • Re: Lahman, how ya doing?
    ... >> I'd started with a Timer class that keeps the total time separately in ... double event job I wound up rewriting a few member functions in the ... derived class identically except for different pointer types. ...
    (comp.object)
  • Re: Whats the best Timer to use
    ... What you want is the Timer class in the System.Timers class. ... static method call every second. ... high performance in mind. ...
    (microsoft.public.dotnet.languages.csharp)
  • POSIX based Timer class, occasional crash
    ... I've got a Timer class and a TimerClient base class. ... number of times to fire the timer, timer attributes, a pointer to the ... client, and a pointer to a client specific "payload" that gets ...
    (comp.unix.programmer)
  • Re: Timers
    ... so do i set the interval to x amount of milliseconds based on milliseconds ... It seems to me your best bet is to determine the exact time in the future you want the timer to execute, calculate the difference between that exact time and "now", and then use the result of that as the timer delay for a one-shot timer. ... It will fire when the elapsed time has expired. ... Each timer class has a slightly different syntax for configuring it as a one-shot timer, so without knowing what class you're using, it's not possible to say for sure what you would want to do. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: when is threading better than a timer?
    ... Looks like I was using the right Timer class, ... Bob ...
    (microsoft.public.dotnet.languages.vb)