Animatroller.Framework.Effect.Sweeper.Sweeper C# (CSharp) Method

Sweeper() public method

public Sweeper ( System.TimeSpan duration, int dataPoints, bool startRunning ) : System
duration System.TimeSpan
dataPoints int
startRunning bool
return System
        public Sweeper(TimeSpan duration, int dataPoints, bool startRunning)
        {
            if (dataPoints < 2)
                throw new ArgumentOutOfRangeException("dataPoints");

            this.positions = dataPoints;
            InternalReset();
            this.jobs = new List<EffectAction.Action>();
            this.timer = new Timer(new TimerCallback(TimerCallback));
            this.ended = false;

            this.interval = new TimeSpan(duration.Ticks / dataPoints);
            log.Debug("Interval {0:N1} ms", this.interval.TotalMilliseconds);

            if (startRunning)
                Resume();
        }