Here you can find the source of sleepFor(int sleepDurationInMilliseconds)
Parameter | Description |
---|---|
sleepDurationInMilliseconds | a parameter |
public static void sleepFor(int sleepDurationInMilliseconds)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w w w . j a va 2 s . com*/ * Attempts to sleep for a specified period * * @param sleepDurationInMilliseconds */ public static void sleepFor(int sleepDurationInMilliseconds) { try { Thread.sleep(sleepDurationInMilliseconds); } catch (InterruptedException e) { System.out.println("Error sleeping thread for: " + sleepDurationInMilliseconds); } } }