All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arch.util.SleepUtils Maven / Gradle / Ivy

There is a newer version: 18.12.0
Show newest version
package com.arch.util;


/**
 * @author wagner
 */
public final class SleepUtils {

    public static final long ONE_HUNDRED = 1_000;
    public static final int SIXTY = 60;

    private SleepUtils() {

    }

    public static void pauseMilliSeconds(int milliSeconds) {
        try {
            Thread.sleep(milliSeconds);
        } catch (InterruptedException ex) {
            LogUtils.generate(ex);
            Thread.currentThread().interrupt();
        }
    }

    public static void pauseSeconds(int segundos) {
        try {
            Thread.sleep(segundos * ONE_HUNDRED);
        } catch (InterruptedException ex) {
            LogUtils.generate(ex);
            Thread.currentThread().interrupt();
        }
    }

    public static void pauseMinutes(int minutes) {
        try {
            Thread.sleep(minutes * SIXTY * ONE_HUNDRED);
        } catch (InterruptedException ex) {
            LogUtils.generate(ex);
            Thread.currentThread().interrupt();
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy