static IEvents BreakBus(SimEnvironment env, SimProcess bus, double interval) { while (true) { yield return(env.Timeout(interval)); if (bus.Succeeded) { break; } bus.Interrupt("Breakdown Bus"); yield return(env.Suspend()); } }