com.arch.util.SleepUtils Maven / Gradle / Ivy
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