Commit 5af73bf78401dd01823ff419a8214d9c73ed810d
leastNumberOfTicks should return Inf if no processes
Signed-off-by: wanderer <mjbecze@gmail.com>wanderer committed on 11/26/2017, 8:06:03 PM
Parent: 8219bd66a439d14f4728e4a0195f4c017c42ab90
Files changed
scheduler.js | changed |
scheduler.js | ||
---|---|---|
@@ -87,9 +87,9 @@ | ||
87 | 87 | * returns the oldest container's ticks |
88 | 88 | * @return {integer} |
89 | 89 | */ |
90 | 90 | leastNumberOfTicks (exclude) { |
91 | - let ticks = 0 | |
91 | + let ticks = Infinity | |
92 | 92 | for (const instance of this.instances) { |
93 | 93 | ticks = instance[1].ticks |
94 | 94 | if (instance[1].id !== exclude) { |
95 | 95 | return ticks |
Built with git-ssb-web