private static async Task CheckFaultTolerantHeap() { try { await Task.Delay(500); if (ValuesStorage.Get(".fth.shown2", false) && FaultTolerantHeapFix.Check()) { NonfatalError.NotifyBackground("Performance issue detected", "Assetto Corsa performance is negatively affected by FTH. Content Manager can try to fix it.", solutions: new[] { new NonfatalErrorSolution("Try to fix the issue", cancellation => { FaultTolerantHeapFix.CheckAndFixAsync().Ignore(); return(Task.Delay(0)); }) }); } else { FaultTolerantHeapFix.CheckAndFixAsync().Ignore(); } } catch (Exception e) { Logging.Error(e); } }
private static async Task CheckFaultTolerantHeap() { await Task.Delay(500); await FaultTolerantHeapFix.CheckAsync(); }