Here you can find the source of sleepSeconds(long seconds)
Sleeps for the specified time--in seconds.
Parameter | Description |
---|---|
seconds | Number of seconds that the current thread sleeps. |
public static void sleepSeconds(long seconds)
//package com.java2s; //License from project: LGPL public class Main { /**/*from w w w . j a va 2s . c om*/ * <p>Sleeps for the specified time--in seconds.</p> * @param seconds Number of seconds that the current thread * sleeps. */ public static void sleepSeconds(long seconds) { try { Thread.sleep(seconds * 1000); } catch (Exception e) { } } }