[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

Timers in System Services

GaryDean

11/15/2008 3:00:00 PM

I need to use timers in a system service I am writing. I've been googling
around and read that there are problems. Some say we can simply drop a
timer on the design service with no problems and other say that is
problematic.

Is there a reccomended way in which to deal with timers in services?
Thanks
Gary


2 Answers

Henning Krause [MVP - Exchange]

11/15/2008 4:01:00 PM

0

Hi,

I've never encountered any issues using System.Timers.Timer or
System.Threading.Timer (the latter one being somewhat lowerlevel than the
first one).

Kind regards,
Henning Krause

"GaryDean" <gdeanblakely@newsgroup.nospam> wrote in message
news:eCX8cLzRJHA.4524@TK2MSFTNGP03.phx.gbl...
>I need to use timers in a system service I am writing. I've been googling
>around and read that there are problems. Some say we can simply drop a
>timer on the design service with no problems and other say that is
>problematic.
>
> Is there a reccomended way in which to deal with timers in services?
> Thanks
> Gary
>

stcheng

11/17/2008 5:34:00 AM

0

Hi Gary,

As for Timers, only if you're developing winform and want to use it in GUI
code. Otherwise, you're always recommended to use the System.Timers.Timer
or Threading.Timer. Here is a former article discussing on the different
timers:

#Comparing the Timer Classes in the .NET Framework Class Library
http://msdn.microsoft.com/en-us/magazine/cc1...

also, Jeffrey Richter's CLR via C# (.net 2.0) also has a threading chapter
discussing on the use of timer class.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

--------------------
>From: "GaryDean" <gdeanblakely@newsgroup.nospam>
>Subject: Timers in System Services
>Date: Sat, 15 Nov 2008 08:00:21 -0700
>
>I need to use timers in a system service I am writing. I've been googling
>around and read that there are problems. Some say we can simply drop a
>timer on the design service with no problems and other say that is
>problematic.
>
>Is there a reccomended way in which to deal with timers in services?
>Thanks
>Gary
>
>
>