System.Threading.Timer vs System.Timers.Timer

  • Thread starter Thread starter RK
  • Start date Start date
R

RK

I have created C# windows service to Peek Message Queues in periodic
intervals and update the database. In the above scenario which Timer
class suitable??

thanks in advance
--RK
 
The System.Threading.Timer is lightweight timer where as the
System.Timers.Timer is server timer. The Timers.Timer can scale better
because they have built for it. My suggestion is if your application is
a server then you should probably use the System.Timers.Timer.
 
Back
Top