protected override void OnStart(string[] args)
        {
            EcoManagement ecomgmt = new EcoManagement();

            EcoLog.WriteEntry("Service Started.");



            // Create a timer with a ten second interval.
            timer = new System.Timers.Timer(ecomgmt.intervalCalc());

            // Hook up the Elapsed event for the timer.
            timer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
            //timer.Interval = 1000;


            timer.Enabled = true;
            GC.KeepAlive(timer);
        }
 protected override void OnContinue()
 {
     EcoLog.WriteEntry("Service Resumed.");
 }
 protected override void OnStop()
 {
     EcoLog.WriteEntry("Service Stopped.");
 }