Lambda syntax sugar
This commit is contained in:
@@ -124,11 +124,7 @@ public class MagicBot extends ListenerAdapter {
|
|||||||
ChatChannel.Init();
|
ChatChannel.Init();
|
||||||
|
|
||||||
// Background thread to send Admin Events
|
// Background thread to send Admin Events
|
||||||
Runnable adminLogRunnable = new Runnable() {
|
Runnable adminLogRunnable = () -> SendAdminLogUpdates();
|
||||||
public void run() {
|
|
||||||
SendAdminLogUpdates();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ScheduledExecutorService exec = Executors.newScheduledThreadPool(1);
|
ScheduledExecutorService exec = Executors.newScheduledThreadPool(1);
|
||||||
exec.scheduleAtFixedRate(adminLogRunnable , 0, 1, TimeUnit.MINUTES);
|
exec.scheduleAtFixedRate(adminLogRunnable , 0, 1, TimeUnit.MINUTES);
|
||||||
|
|||||||
Reference in New Issue
Block a user