public void DisallowTimeChange() { Task delay = new React.Tasking.Delay(_sim, 10); delay.Activate(null); ((React.Tasking.Delay)delay).Time += 1; }
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); }
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); }