I'm new to C# and I'm doing a project needs two timer to access the same variable at the same time.(one to read and other one to write or update).So, my problem is which Timer should I use? Forms.Timer or Thread.Timer. I've read some article about their difference. Since I want to use these timers to update the Interface of the program (image in picture box), So I think Forms.Timer should be used here since it's related to GUI stuff. However, the order that which timer executes first is also matter, so I think Thread.Timer should also be considered. Is there any way I can combine them together?
Update: I'm doing a ECG project, so basically I'm keeping receiving data and I want to draw them on the form. however, since drawing took about 40 ms, so using one timer would have delay but I need real time.(For example, If I set the interval to 100 ms, then It took 140 ms to finish one frame drawing that should be finished in 100 ms. This will cause 40 ms delay for every tick. ) Therefore, My solution is using one timer to update the data buffer when I received the data, and use other timer to call Invalidate, which would repaint all the new data. Should I use thread.timer to do the updating of data and form.timer to redraw the form?