|
Hi all,
I have tried to find an answer for my question on searching but I have not got a satisfied answer yet because this question requires experience about .net. Thanks in advance,
For my C# application I use 3 timers: 1. Timer 1: Tick every second (1000 ms), inside tick method, a counter_second++: thsi timer never stops 2. Timer 2: Tick every 20 ms is used for sending a command to serial port every 20 ms, and then stops to wait to receive reply 3. Timer 3: Tick every 100 ms: also never stops to check whether there is any response command from timer2 or not, if there is not, Retry to send from timer2 starts again.
I really dont understand clearly about timer, so my question is that if I use 3 timers like this, how about deadlock any other problems for this? because I think 3 timers are too much for one application, is it it?
Above 3 timer, I used Windows.Forms.Timer.
The second question is which one of following timers is the best to use: System.Windows.Forms.Timer System.Timers.Timer System.Threading.Timer
with criteria such as: 1. perfomanace 2. memory 3. time consuming
Thanks in advance,
Joesy
|