Java Sleep sleep(long millis)

Here you can find the source of sleep(long millis)

Description

sleep

License

Open Source License

Declaration

public static void sleep(long millis) 

Method Source Code

//package com.java2s;
/*//  w  w  w  .  java  2s.co m
 * Copyright (c) 2007-2009, 2011-2013, 2015, 2016 Eike Stepper (Berlin, Germany) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Eike Stepper - initial API and implementation
 */

public class Main {
    public static void sleep(long millis) {
        try {
            Thread.sleep(millis);
        } catch (InterruptedException ex) {
            return;
        }
    }

    public static void sleep(long millis, int nanos) {
        try {
            Thread.sleep(millis, nanos);
        } catch (InterruptedException ex) {
            return;
        }
    }
}

Related

  1. sleep(long millis)
  2. sleep(long millis)
  3. sleep(long millis)
  4. sleep(long millis)
  5. sleep(long millis)
  6. sleep(long millis)
  7. sleep(long millis)
  8. sleep(long millis)
  9. sleep(long millis)