Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Scheduling::fcfc()
- {
- float time = 0.0,
- sumTimeMedium = 0.0;
- for (unsigned int i = 1; i < mTimeArrival.size(); i++)
- {
- time = time + mTimeDuration[i-1] - (mTimeArrival[i]-mTimeArrival[i-1]);
- sumTimeMedium+=time;
- }
- sumTimeMedium = sumTimeMedium/mTimeArrival.size();
- std::cout << std::fixed << std::showpoint;
- std::cout << std::setprecision(1);
- std::cout<< "FCFS "<<sumTimeMedium<< std::endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement