private void Discharge() { while (bDischarge) { simCorp.Discharge(10); BatteryDischargeTask.Wait(1000); } }