Koolaidman
New member
- Joined
- Nov 15, 2004
- Messages
- 2
- Programming Experience
- 10+
Hi,
I am having a problem with a service I have created which uses a System Timer. Basically, what is happening is the Timer seems to just stop running for no reason what so ever. I have created the timer as
X.Timer1 = New System.Timers.Timer
In the OnStart section of the service, i have added
Timer1.Enabled = True
And Then
PrivateSub Timer1_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed
Try
Timer1.Enabled = False
<..Routine..>
Catch e as Exception
<..Routine..>
Finally
Timer1.Enabled = True
End Try
End Sub
If anyone has any clues as to what I may have done wrong that would cause the timer to just stop working.
Matt
I am having a problem with a service I have created which uses a System Timer. Basically, what is happening is the Timer seems to just stop running for no reason what so ever. I have created the timer as
X.Timer1 = New System.Timers.Timer
In the OnStart section of the service, i have added
Timer1.Enabled = True
And Then
PrivateSub Timer1_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed
Try
Timer1.Enabled = False
<..Routine..>
Catch e as Exception
<..Routine..>
Finally
Timer1.Enabled = True
End Try
End Sub
If anyone has any clues as to what I may have done wrong that would cause the timer to just stop working.
Matt