Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. static Thread t = new Thread(new Runnable() {
  2.  
  3. @Override
  4. public void run() {
  5.  
  6. while(true){
  7.  
  8. //Action
  9.  
  10. try {
  11. Thread.sleep(1000);
  12. } catch (InterruptedException ex) {
  13. ex.printStackTrace();
  14. }
  15.  
  16. }
  17.  
  18. }
  19. });
  20.  
  21.  
  22.  
  23. t.start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement