private void SMAMinerCheck_Tick(object sender, EventArgs e) { SMAMinerCheck.Interval = ConfigManager.GeneralConfig.SwitchMinSecondsFixed * 1000 + R.Next(ConfigManager.GeneralConfig.SwitchMinSecondsDynamic * 1000); if (ComputeDeviceManager.Group.ContainsAMD_GPUs) { SMAMinerCheck.Interval = (ConfigManager.GeneralConfig.SwitchMinSecondsAMD + ConfigManager.GeneralConfig.SwitchMinSecondsFixed) * 1000 + R.Next(ConfigManager.GeneralConfig.SwitchMinSecondsDynamic * 1000); } #if (SWITCH_TESTING) SMAMinerCheck.Interval = MiningDevice.SMAMinerCheckInterval; #endif MinersManager.SwichMostProfitableGroupUpMethod(Globals.NiceHashData); }
private void SMAMinerCheck_Tick(object sender, EventArgs e) { SMAMinerCheck.Interval = ConfigManager.GeneralConfig.SwitchMinSecondsFixed * 1000 + R.Next(ConfigManager.GeneralConfig.SwitchMinSecondsDynamic * 1000); if (ComputeDeviceManager.Group.ContainsAMD_GPUs) { SMAMinerCheck.Interval = (ConfigManager.GeneralConfig.SwitchMinSecondsAMD + ConfigManager.GeneralConfig.SwitchMinSecondsFixed) * 1000 + R.Next(ConfigManager.GeneralConfig.SwitchMinSecondsDynamic * 1000); } #if (SWITCH_TESTING) SMAMinerCheck.Interval = MiningDevice.SMAMinerCheckInterval; #endif if (isSMAUpdated) // Don't bother checking for new profits unless SMA has changed { isSMAUpdated = false; MinersManager.SwichMostProfitableGroupUpMethod(Globals.NiceHashData); } }
private async void SMAMinerCheck_Tick(object sender, EventArgs e) { _smaMinerCheck.Interval = ConfigManager.GeneralConfig.SwitchMinSecondsFixed * 1000 + R.Next(ConfigManager.GeneralConfig.SwitchMinSecondsDynamic * 1000); if (ComputeDeviceManager.Group.ContainsAmdGpus) { _smaMinerCheck.Interval = (ConfigManager.GeneralConfig.SwitchMinSecondsAMD + ConfigManager.GeneralConfig.SwitchMinSecondsFixed) * 1000 + R.Next(ConfigManager.GeneralConfig.SwitchMinSecondsDynamic * 1000); } #if (SWITCH_TESTING) SMAMinerCheck.Interval = MiningDevice.SMAMinerCheckInterval; #endif if (_isSmaUpdated) { // Don't bother checking for new profits unless SMA has changed _isSmaUpdated = false; await MinersManager.SwichMostProfitableGroupUpMethod(); } }