Advertisement
AbraaoAllysson

function ESCALONADOR

Oct 1st, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. void Scheduling::fcfc()
  2. {
  3. float time = 0.0,
  4. sumTimeMedium = 0.0;
  5.  
  6. for (unsigned int i = 1; i < mTimeArrival.size(); i++)
  7. {
  8. time = time + mTimeDuration[i-1] - (mTimeArrival[i]-mTimeArrival[i-1]);
  9. sumTimeMedium+=time;
  10. }
  11. sumTimeMedium = sumTimeMedium/mTimeArrival.size();
  12. std::cout << std::fixed << std::showpoint;
  13. std::cout << std::setprecision(1);
  14. std::cout<< "FCFS "<<sumTimeMedium<< std::endl;
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement