MNet cleanup

This commit is contained in:
Anuken
2019-08-23 15:04:31 -04:00
parent de031b1ddb
commit 5f9000db92
3 changed files with 45 additions and 39 deletions

View File

@@ -643,6 +643,13 @@ public class ServerControl implements ApplicationListener{
info("Nobody with that name could be found.");
}
});
handler.register("gc", "Trigger a grabage collection. Testing onlu.", arg -> {
int pre = (int)(Core.app.getJavaHeap() / 1024 / 1024);
System.gc();
int post = (int)(Core.app.getJavaHeap() / 1024 / 1024);
info("&ly{0}&lg MB collected. Memory usage now at &ly{1}&lg MB.", pre - post, post);
});
}
private void readCommands(){