Wip maj (okay i stop trying to optimise) roundRobin

This commit is contained in:
iboyeau 2023-03-13 15:06:13 +01:00
parent 4ce44f48b6
commit 87b1727434

View File

@ -56,13 +56,11 @@ public class RoundRobin extends Scheduler {
private User UserSelection(int Ts, int Sp, List<User> Users) { private User UserSelection(int Ts, int Sp, List<User> Users) {
//for (int i = 0; i < Ts; i++) { for (int i = 0; i < Ts; i++){
// for (int j = 0; j < Sp; j++) { for (int j = 0; j < Sp; j++) {
// index++; index++;
// } }
//} }
index = (Ts + 1) * (Sp + 1);
return Users.get(index%(Users.size() - 1)); return Users.get(index%(Users.size() - 1));
} }