Here you can find the source of pause(int milliseconds)
public static void pause(int milliseconds)
//package com.java2s; //License from project: Open Source License public class Main { public static void pause(int milliseconds) { try {/*from w w w . ja va2 s. c om*/ Thread.sleep(milliseconds); } catch (InterruptedException e) { e.printStackTrace(); } } public static void pause(float milliseconds) { try { Thread.sleep((long) milliseconds); } catch (InterruptedException e) { e.printStackTrace(); } } public static void pause(long milliseconds) { try { Thread.sleep(milliseconds); } catch (InterruptedException e) { e.printStackTrace(); } } }