1) OnTick() function that takes 400 milliseconds to execute.
2) OnTimer() function that takes 10 milliseconds to execute.
If I have EventSetMillisecondTimer(100), what will happen? :
1) Will OnTick() function be interrupted several times during its execution to run OnTimer() and then resume its execution (every time it is interrupted)?
2) Will OnTimer() events be ignored until OnTick() function is fully executed ?
The OnTick() event handler will not be interrupted. It will hold control until it returns. All pending events (of any type), will be queued (not ignored) and will await their turn to be processed.
The same applies to the OnTimer() event handler (or any other event handler) — it will hold control until it returns, and then the next queued event will be processed.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
Let's suppose that I have an :
1) OnTick() function that takes 400 milliseconds to execute.
2) OnTimer() function that takes 10 milliseconds to execute.
If I have EventSetMillisecondTimer(100), what will happen? :
1) Will OnTick() function be interrupted several times during its execution to run OnTimer() and then resume its execution (every time it is interrupted)?
2) Will OnTimer() events be ignored until OnTick() function is fully executed ?
Thanks !