示例#1
0
    // Schedules a BUD request in the system
    public void ScheduleBUD(BUDSignal b, int tickOffset)
    {
        if (tickOffset == 0)
        {
            if (this.data.ContainsKey(this.currentTime))
            {
                if (!this.data[this.currentTime].Contains(b))
                {
                    this.data[this.currentTime].Add(b);
                }
            }
            else
            {
                this.data.Add(this.currentTime, new List <BUDSignal>());
                this.data[this.currentTime].Add(b);
            }
        }
        else
        {
            string fakeTime = schedulerTime.FakeSum(tickOffset);

            if (this.data.ContainsKey(fakeTime))
            {
                if (!this.data[fakeTime].Contains(b))
                {
                    this.data[fakeTime].Add(b);
                }
            }
            else
            {
                this.data.Add(fakeTime, new List <BUDSignal>());
                this.data[fakeTime].Add(b);
            }
        }
    }
示例#2
0
 public void SetTime()
 {
     this.timeToRelease = time.FakeSum(30);
 }