/// <summary> /// Alustaa uuden ajastinluokan. /// </summary> public Timer() { SecondCounter = new DoubleMeter(0); Times = new IntMeter(1); Times.MinValue = 1; Times.MaxValue = 1; Enabled = false; }
internal IntMeterAddOperation(IntMeter meter, int change, double seconds) { this.meter = meter; this.dx = Math.Sign(change); int times = (int)Math.Abs(change); timer = new Timer(); timer.Times.LowerLimit += OnFinished; timer.Interval = Math.Abs(seconds / change); timer.Timeout += Tick; timer.Start(times); }