CodeWrangler
asked on
TIMER in C# .Net
If I have a lot of stuff happening in the code that executed when the timer elapses, does the timer wait until the code is executed? in other words, does the timer restart when the code defined in the 'elapsed' function starts executing or ends executing? If it re-starts when the code begins executing is there a way to stop or pause the time while the code is being executed?
void Ttimer_elapsed(..)
{
...
...
}
proctected override void onstart()... etc
Is simply putting a Ttimer.stop() and Ttimer.start() in the _elapsed code sufficient?
void Ttimer_elapsed(..)
{
...
...
}
proctected override void onstart()... etc
Is simply putting a Ttimer.stop() and Ttimer.start() in the _elapsed code sufficient?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the quick responses. Kaufmed, i think Autoreset is the way to go.. i will test and post back.
Apologies if the question was constructed a bit odd :)
Apologies if the question was constructed a bit odd :)
The timer event is executed in the period of time defined.
If you stop the timer or pause it the event is not executed.
Once the event start you can not stop it except in the same event.
The timer does not restart at any moment the timer is dependent of the time clock.
Hope this helps