public final class
Util class, that allows to put current thread to sleep.
public static void
sleep(int millis, String interruptedMessage)¶
Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds, subject to the precision and accuracy of system timers and schedulers.
- millis – the length of time to sleep in milliseconds
- interruptedMessage – the message to put in logs, in case the waiting gets interrupted