Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class ServiceGlobals // Globals
- {
- public static System.Timers.Timer _timer = new System.Timers.Timer();
- }
- protected override void OnStart(string[] args)
- {
- ServiceGlobals._timer.AutoReset = false;
- ServiceGlobals._timer.Interval = (3000);
- ServiceGlobals._timer.Elapsed += new System.Timers.ElapsedEventHandler(_timer_Elapsed);
- ServiceGlobals._timer.Enabled = true;
- ServiceGlobals._timer.Start(); // Start timer
- }
- if (ServiceGlobals._timer.Enabled) // Check if the timer is running
- {
- // Return error.........
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement