/// <summary> /// Initialises a recurring new PIT handler. /// </summary> /// <param name="HandleOnTrigger">The method to call when the timeout expires.</param> /// <param name="aState">The state object to pass to the handler.</param> /// <param name="NanosecondsTimeout">The timeout, in nanoseconds.</param> /// <param name="NanosecondsLeft">The intial timeout value, in nanoseconds.</param> public PITHandler(Devices.TimerHandler HandleOnTrigger, FOS_System.Object aState, long NanosecondsTimeout, uint NanosecondsLeft) { this.HandleTrigger = HandleOnTrigger; this.NanosecondsTimeout = NanosecondsTimeout; this.NSRemaining = NanosecondsLeft; this.Recurring = true; this.state = aState; }
public override int RegisterHandler(Devices.TimerHandler handler, long TimeoutNS, bool Recurring, FOS_System.Object state) { return(RegisterHandler(new PITHandler(handler, state, TimeoutNS, Recurring))); }