private void MinerStatsCheck_Tick(object sender, EventArgs e) { MinersManager.MinerStatsCheck(Globals.NiceHashData); string json = JsonConvert.SerializeObject(hashData, Formatting.Indented); try { File.WriteAllText(Path.Combine(((DriveDirectory)server.Root).Path, "stats.json"), json); } catch (Exception ex) { // continue } }
// [Obsolete("Deprecated in favour of AlgorithmSwitchingManager timer")] // 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(); // } // } private static async void MinerStatsCheck_Tick(object sender, EventArgs e) { await MinersManager.MinerStatsCheck(); }
private void MinerStatsCheck_Tick(object sender, EventArgs e) { MinersManager.MinerStatsCheck(Globals.NiceHashData); }
private static async void MinerStatsCheck_Tick(object sender, EventArgs e) { await MinersManager.MinerStatsCheck(Globals.NiceHashData); }