Here's my problem:
I set a timer interval as 200 ms. If there is heavy code in the tick event, does the timer work like this?:
- timer interval is 200 ms
- it takes 20 ms to run the code in the tick event
- after tick event the timer waits 200 ms again so after all it has taken 420 ms to run one event?
There are problems in the timer too. For example if the interval is 346 ms, the real time can be 353 ms. I calculated the real time with simple code but I think it shouldn't take 7 ms to calculate the time difference... How can I make really accurate timer?
How does the timer tick event really work? The event is in the same class as the measurement code. Does the tick event code prevent all other procedure of code or does it work like a thread?
I need very accurate timer since I'm doing a data measurement with quite short intervals
I set a timer interval as 200 ms. If there is heavy code in the tick event, does the timer work like this?:
- timer interval is 200 ms
- it takes 20 ms to run the code in the tick event
- after tick event the timer waits 200 ms again so after all it has taken 420 ms to run one event?
There are problems in the timer too. For example if the interval is 346 ms, the real time can be 353 ms. I calculated the real time with simple code but I think it shouldn't take 7 ms to calculate the time difference... How can I make really accurate timer?
How does the timer tick event really work? The event is in the same class as the measurement code. Does the tick event code prevent all other procedure of code or does it work like a thread?
I need very accurate timer since I'm doing a data measurement with quite short intervals