Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

java sleep 1 second

import java.util.Date;
public class JavaHungry {
    public static void main(String args[]) {
      try
      {
        System.out.println("Start of delay: "+ new Date());
        // Delay for 7 seonds
        Thread.sleep(7000);   
        System.out.println("End of delay: "+ new Date());
      }
      catch(InterruptedException ex)
      {
          ex.printStackTrace();
      }
    }
}
Source by javahungry.blogspot.com #
 
PREVIOUS NEXT
Tagged: #java #sleep
ADD COMMENT
Topic
Name
2+2 =