Here you can find the source of pause(double seconds)
public static void pause(double seconds)
//package com.java2s; /************************************************************************************** * Copyright (c) 2013, Universitat Politecnica de Valencia. All rights reserved. * * This program and the accompanying materials are made available under the terms * * of the 3-Clause BSD License which accompanies this distribution, and is available * * at http://www.opensource.org/licenses/BSD-3-Clause. The research leading to these * * results has received funding from the European Community`s Seventh Framework * * Programme (FP7/2007-2013) under the grant agreement FP7-257574 FITTEST. * **************************************************************************************/ public class Main { public static void pause(double seconds) { if (seconds <= 0) return; try {//from www . j a va2 s .com Thread.sleep(Math.round(seconds * 1000.0)); } catch (InterruptedException e) { throw new RuntimeException(e); } } }