📄 sleep.java
字号:
/** * $Source: /home/ws/rz65/CVS-Repository/WorkflowProjects/JBPM-Demo/src/java/jbpmdemo/util/Sleep.java,v $ * $Revision: 1.1 $ * $Date: 2005/03/05 12:16:31 $ * $Author: rz65 $ * * Copyright (c) 2005 Universitaet Karlsruhe (TH) / Rechenzentrum (RZ-UNI-UKA) * * RZ-UNI-KA makes no representations or warranties about the suitability * of this software, either express or implied, including but not limited * to the implied warranties of merchantability, fitness for a particular * purpose, or non-infringement. RZ-UNI-KA shall not be liable for any * damages as a result of using, modifying or distributing this software * or its derivatives. */package jbpmdemo.util;import jbpmdemo.util.UtilConstants;/** * This class provides simple static delay methods. * * <p> * * @version $Revision: 1.1 $ * @author mailto:harald.meyer@rz.uni-karlsruhe.de * */public class Sleep implements UtilConstants { /** * Prevent instantiation. * */ private Sleep() { } /** * Sleeps for a certain amount of milliseconds. * * @param msec * The sleep interval size. */ public static void sleepMillis(long msec) { try { Thread.sleep(msec); } catch (InterruptedException e) { } } /** * Sleeps for a certain amount of milliseconds. * * @param sec * The sleep interval size. */ public static void sleepSeconds(long sec) { sleepMillis(1000 * sec); } /** * Sleeps for a certain amount of minutes. * * @param min * The sleep interval size. */ public static void sleepMinutes(long min) { sleepMillis(60 * 1000 * min); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -