protected override void DoChargeWork()
 {
     for (;;)
     {
         Thread.Sleep(ChargeEllapsedTime);
         StartStopChargeEvent.WaitOne();
         IncreaseCharge();
     }
 }
Esempio n. 2
0
        protected override async void DoChargeWork()
        {
            for (;;)
            {
                await Task.Delay(ChargeEllapsedTime);

                StartStopChargeEvent.WaitOne();
                IncreaseCharge();
            }
        }