Java Milliseconds Parse pauseMilliseconds(long duration)

Here you can find the source of pauseMilliseconds(long duration)

Description

Make a pause

License

Open Source License

Parameter

Parameter Description
duration Duration in milliseconds

Declaration

public static void pauseMilliseconds(long duration) 

Method Source Code

//package com.java2s;
/* //  w ww  .  ja v  a2  s  .co  m
 * Copyright 2012 Devoteam http://www.devoteam.com
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 * 
 * 
 * This file is part of Multi-Protocol Test Suite (MTS).
 * 
 * Multi-Protocol Test Suite (MTS) is free software: you can redistribute
 * it and/or modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation, either version 3 of the
 * License.
 * 
 * Multi-Protocol Test Suite (MTS) is distributed in the hope that it will
 * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Multi-Protocol Test Suite (MTS).
 * If not, see <http://www.gnu.org/licenses/>.
 * 
 */

public class Main {
    /**
     * Make a pause
     *
     * @param duration Duration in milliseconds
     */
    public static void pauseMilliseconds(long duration) {
        try {
            Thread.sleep(duration);
        } catch (Exception e) {
            Thread.currentThread().interrupt();
        }
    }
}

Related

  1. parseMillis(String s)
  2. parseMillisecond(String date)
  3. parseTimeSpanMillis(final String text)
  4. parseTimeStrToMilliseconds(String timeStr)
  5. parseToMillis(String s)
  6. pauseMilliSeconds(long pauseMilliSeconds)