Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java pause

//deprecated in main thread:
try {
  Thread.sleep(1000);//time is in ms (1000 ms = 1 second)
} catch (InterruptedException e) {e.printStackTrace();}

//please use bellow instead:
Timer timer = new Timer();
timer.schedule(new TimerTask() {
  @Override
  public void run() {
    //what you want to do
  }
}, 1000);//wait 1000ms before doing the action
 
PREVIOUS NEXT
Tagged: #java #pause
ADD COMMENT
Topic
Name
1+2 =