code: public static void logMemory(long interval, Level level) {
  		Task<Void,NoException> task = new Task.Cpu<Void,NoException>("Logging memory", Task.PRIORITY_BACKGROUND) {
  			@Override
  			public Void run() {
  				logMemory(level);
  				return null;
  			}
  		};
  		task.executeEvery(interval, interval);
  		task.start();
  	}
docs: Log memory usage to the console at regular interval.