Wait 50 ms after gc

This commit is contained in:
M66B
2021-03-06 11:14:23 +01:00
parent 5e4f8b5d1e
commit 399d2f7917
4 changed files with 17 additions and 8 deletions

View File

@@ -1667,6 +1667,15 @@ public class Helper {
// Miscellaneous
static void gc() {
Runtime.getRuntime().gc();
try {
Thread.sleep(50);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
static <T> List<List<T>> chunkList(List<T> list, int size) {
List<List<T>> result = new ArrayList<>(list.size() / size);
for (int i = 0; i < list.size(); i += size)