Wip maj (okay i stop trying to optimise) roundRobin
This commit is contained in:
parent
4ce44f48b6
commit
87b1727434
@ -56,13 +56,11 @@ public class RoundRobin extends Scheduler {
|
||||
private User UserSelection(int Ts, int Sp, List<User> Users) {
|
||||
|
||||
|
||||
//for (int i = 0; i < Ts; i++) {
|
||||
// for (int j = 0; j < Sp; j++) {
|
||||
// index++;
|
||||
// }
|
||||
//}
|
||||
|
||||
index = (Ts + 1) * (Sp + 1);
|
||||
for (int i = 0; i < Ts; i++){
|
||||
for (int j = 0; j < Sp; j++) {
|
||||
index++;
|
||||
}
|
||||
}
|
||||
return Users.get(index%(Users.size() - 1));
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user