package com.qianwen.core.tool.utils; import java.util.concurrent.TimeUnit; public class ThreadUtil { public static void sleep(long millis) { try { Thread.sleep(millis); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } public static void sleep(TimeUnit timeUnit, long timeout) { try { timeUnit.sleep(timeout); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } }