Exemple #1
0
        public void AncestorMemoTimerTickInterval(ApprovalTracker approval)
        {
            double intervalDelta = approval.IntervalDelta;

            this.nextEvent.AncestorMemoTickInterval(approval);

            if (this.nextEvent.Completed)
            {
                this.prevEvent = this.nextEvent;
                this.nextEvent = this.GenTimerEvent();
            }
            else if (this.nextEvent.Finalized)
            {
                return;
            }
            else if (approval.IntervalDelta > TriggerPositiveMemoThreshold &&
                     this.CanScheduleDelta)
            {
                this.nextEvent = this.GenDeltaEvent(MemoType.positive);
            }
            else if (approval.IntervalDelta < TriggerNegativeMemoThreshold &&
                     this.CanScheduleDelta)
            {
                this.nextEvent = this.GenDeltaEvent(MemoType.negative);
            }
        }
Exemple #2
0
        public AncestorMemoTimer()
        {
            int timeToFirst = TicksBeforeFirst + this.GenTimerTicks();

            this.nextEvent = new AncestorMemo(timeToFirst, MemoType.undecided, MemoCause.timer);
        }