Sleep current thread : Thread « Development « Android






Sleep current thread

    

public class ServerUtils {
  
  public static void sleep(long time) {
    try {
      Thread.currentThread();
      Thread.sleep(time);
    } catch (InterruptedException ex) {
      ex.printStackTrace();
    }
  }
  
  
}

   
    
    
    
  








Related examples in the same category

1.Threads Handler Demo
2.Abstract Running Thread
3.Executors.newFixedThreadPool
4.Counting Thread
5.Task Queue
6.Delay Task