Possible Duplicate:
Synchronizing a timer to prevent overlap
I have a Threading.Timer
in my class.
System.Threading.Timer timer;
TimerCallback cb = new TimerCallback(ProcessTimerEvent);
timer = new Timer(cb, reset, 1000, Convert.ToInt64(this.Interval.TotalSeconds));
and defined a callback for it.
private void ProcessTimerEvent(object obj)
{
if(value)
MyFunction();
}
When run it, re-running callback before myfunction
to complete.
How to pause Threading.Timer
to complete myfunction
?