public static IDisposable BindTo (this IPool pool,IReadOnlyTimer timer,int keep) { return new TimerBinding(pool,timer,keep); } class TimerBinding : IDisposable { readonly IReadOnlyTimer m_Timer; readonly IPool m_Pool; readonly int m_Keep; bool m_IsDisposed; public TimerBinding (IPool pool,IReadOnlyTimer timer,int keep) { m_Pool = pool; m_Timer = timer; m_Keep = keep; m_Timer.OnElapsed += OnElapsed