Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void runTimer(){
- if(snake.isAlive()){
- ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
- executor.schedule(runTimer(), 1, TimeUnit.SECONDS);
- executor.shutdown();
- }
- }
Add Comment
Please, Sign In to add comment