namespace XFEEDToolBox.Core.Navigation;
/// <summary>The original station grants five minutes after undocking. Leave time for menu recovery.</summary>
public static class StationDepartureWatchdog
{
public static readonly TimeSpan RecoveryAfter = TimeSpan.FromMinutes(3);
public static void Check(long marketId, TimeSpan elapsed)
{
if (elapsed >= RecoveryAfter)
throw new StationDepartureRecoveryException(marketId, elapsed);
}
}
public sealed class StationDepartureRecoveryException(long marketId, TimeSpan elapsed)
: TimeoutException("安全离场或接管尚未确认,正在空间站期限前恢复原航程。")
{
public long MarketId { get; } = marketId;
public TimeSpan Elapsed { get; } = elapsed;
}
namespace XFEEDToolBox.Core.Navigation;
/// <summary>The original station grants five minutes after undocking. Leave time for menu recovery.</summary>
public static class StationDepartureWatchdog
{
public static readonly TimeSpan RecoveryAfter = TimeSpan.FromMinutes(3);
public static void Check(long marketId, TimeSpan elapsed)
{
if (elapsed >= RecoveryAfter)
throw new StationDepartureRecoveryException(marketId, elapsed);
}
}
public sealed class StationDepartureRecoveryException(long marketId, TimeSpan elapsed)
: TimeoutException("安全离场或接管尚未确认,正在空间站期限前恢复原航程。")
{
public long MarketId { get; } = marketId;
public TimeSpan Elapsed { get; } = elapsed;
}