예제 #1
0
        public void DisallowTimeChange()
        {
            Task delay = new React.Tasking.Delay(_sim, 10);

            delay.Activate(null);
            ((React.Tasking.Delay)delay).Time += 1;
        }
예제 #2
0
        public DesTask Delay(ulong relTime)
        {
            if (relTime < 0)
            {
                relTime = 0;
            }

            DesTask desTask;

            if (IsBlocked)
            {
                desTask = new React.Tasking.Delay(Simulation, relTime);
            }
            else
            {
                // Need to clear interrupt flag or Activate is ignored.
                ClearInterrupt();
                Activate(null, relTime);
                desTask = this;
            }

            return(desTask);
        }
예제 #3
0
        public Task Delay(long relTime)
        {
            if (relTime < 0)
            {
                throw new ArgumentException("'relTime' cannot be negative.");
            }

            Task task;

            if (IsBlocked)
            {
                task = new React.Tasking.Delay(Simulation, relTime);
            }
            else
            {
                // Need to clear interrupt flag or Activate is ignored.
                ClearInterrupt();
                Activate(null, relTime);
                task = this;
            }

            return(task);
        }