Here you can find the source of pause(double timeInSec)
public static void pause(double timeInSec)
//package com.java2s; //License from project: Open Source License public class Main { public static void pause(double timeInSec) { long start = System.currentTimeMillis(); while (System.currentTimeMillis() < (start + (timeInSec * 1000))) { // do nothing }/*from ww w . j a v a2 s. c o m*/ } }