G
Guest
Hello,
I am using a timer object in my Windows Forms Application. Does the code in
..elapsed event run in a diffrent thread? If the interval is set to 10
milliseconds and the time to execute the code in the .elapsed event takes 1
secocond to complete, what happens?
1) Timer starts. 10 milliseconds later the code is executed and timer stops.
When code is done, 1 seconds later, the timer continues. 10 milliseconds
later the code is executed and the timer stops. etc etc
2) Timer starts. 10 milliseconds later the code is executed. 10 milliseconds
the code is executed again, etc, etc.
3) Timer starts. 10 milliseconds later the code is executed and timer stops.
1 seconds later the timer starts again. But because the 1 second is longer
then the 10 milliseconds the code is executed right away.
4) Something else?
Philip Wagenaar
I am using a timer object in my Windows Forms Application. Does the code in
..elapsed event run in a diffrent thread? If the interval is set to 10
milliseconds and the time to execute the code in the .elapsed event takes 1
secocond to complete, what happens?
1) Timer starts. 10 milliseconds later the code is executed and timer stops.
When code is done, 1 seconds later, the timer continues. 10 milliseconds
later the code is executed and the timer stops. etc etc
2) Timer starts. 10 milliseconds later the code is executed. 10 milliseconds
the code is executed again, etc, etc.
3) Timer starts. 10 milliseconds later the code is executed and timer stops.
1 seconds later the timer starts again. But because the 1 second is longer
then the 10 milliseconds the code is executed right away.
4) Something else?
Philip Wagenaar