Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(2);
- final Runnable bondingTask = this::initiateBondingRound;
- scheduledExecutorService.scheduleAtFixedRate(bondingTask, 0, 2, TimeUnit.SECONDS);
- final Runnable neighboursTask = this::initiateNeighboursRound;
- scheduledExecutorService.scheduleAtFixedRate(neighboursTask, 2, 1, TimeUnit.SECONDS);
Add Comment
Please, Sign In to add comment