Public Sub Initialize
ClassName = g.GetClassName(Me)
priorSnapshotMap.Initialize
timer1.Initialize("timer1", 15000) ' Every 15 seconds
timer1.Enabled = True
StartMessageLoop '<- don't forget!
End Sub
Sub Timer1_Tick
Logger.Debug("Background - " & ClassName)
If Main.state <> "running" Then Return
timer1.Enabled = False
Collect ' This does the actual work and has a try/catch block around that code
timer1.Enabled = True
End Sub