Пример #1
0
        public void elmiTDeff(int bbT,process p) {
            process tmp = p;
            while (tmp != null) {
                int at = tmp.get_aT();
                int tbbT = bbT + tmp.get_timePassed();
                if (at- tmp.get_timePassed() != 0) {

                    if (at > tbbT)
                        tmp.set_timePassed(tbbT);
                    else
                        tmp.set_timePassed(at);
                    
                }
                tmp = tmp.get_next();
            }
        }
Пример #2
0
 public void restPassedT()
 {
     if (isEmpty()) return;
     head.set_timePassed(0);
     head.set_bTimePassed(0);
     process tmp = head.get_next();
     while (tmp != null)
     {
         tmp.set_timePassed(0);
         tmp.set_bTimePassed(0);
         tmp = tmp.get_next();
     }
 }
Пример #3
0
        public void swap(process tmp,process tmp2) {
            string tmpStr = tmp2.get_processName();
            int tmpAT = tmp2.get_aT();
            int tmpBT = tmp2.get_bT();
            int tmpPir = tmp2.get_priority();
            int tmpatp = tmp2.get_timePassed();
            int tmpbtp = tmp2.get_bTimePassed();
            tmp2.set_aT(tmp.get_aT());
            tmp2.set_bT(tmp.get_bT());
            tmp2.set_processName(tmp.get_processName());
            tmp2.set_priority(tmp.get_priority());
            tmp2.set_timePassed(tmp.get_timePassed());
            tmp2.set_bTimePassed(tmp.get_bTimePassed());
            tmp.set_aT(tmpAT);
            tmp.set_bT(tmpBT);
            tmp.set_processName(tmpStr);
            tmp.set_priority(tmpPir);
            tmp.set_timePassed(tmpatp);
            tmp.set_bTimePassed(tmpbtp);

        }