private void CalcMenor() { Elemento next = this.prim.Prox; while (next != null) { Processo dd = (Processo)menor; if (dd == null) { this.menor = next.GetDados(); } else if (dd.CompareTTotalExecucao(next.GetDados()) == -1) { this.menor = next.GetDados(); } next = next.Prox; } }
public virtual void Add(Dados el) { Rebuild(); Elemento aux = new Elemento(el); this.ult.Prox = aux; this.ult = aux; ElementAdded(); Processo dd = (Processo)menor; if (dd == null) { this.menor = el; } else if (dd.CompareTTotalExecucao(el) == -1) { this.menor = el; } }