diff options
author | Gary Gregory <garydgregory@gmail.com> | 2022-08-21 15:17:44 -0400 |
---|---|---|
committer | Gary Gregory <garydgregory@gmail.com> | 2022-08-21 15:17:44 -0400 |
commit | f8df864f4cde9d8c6a21ba04ecfe9abd286de71d (patch) | |
tree | 6a566a12603c50d746adb3f49e119d5a2dc8bcda /src/main/java/org/apache/commons/lang3/ThreadUtils.java | |
parent | e92dafdc3b3d841ec95fe3df17722a5bdec3658a (diff) | |
download | apache-commons-lang-f8df864f4cde9d8c6a21ba04ecfe9abd286de71d.tar.gz |
Add ThreadUtils.sleepQuietly(Duration)
Remove new ThreadUtils.sleepQuietly(long)
Diffstat (limited to 'src/main/java/org/apache/commons/lang3/ThreadUtils.java')
-rw-r--r-- | src/main/java/org/apache/commons/lang3/ThreadUtils.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/apache/commons/lang3/ThreadUtils.java b/src/main/java/org/apache/commons/lang3/ThreadUtils.java index 362b32ac2..048842d21 100644 --- a/src/main/java/org/apache/commons/lang3/ThreadUtils.java +++ b/src/main/java/org/apache/commons/lang3/ThreadUtils.java @@ -554,17 +554,17 @@ public class ThreadUtils { } /** - * Sleeps for the given amount of milliseconds while ignoring {@link InterruptedException}. + * Sleeps for the given duration while ignoring {@link InterruptedException}. * <p> - * The sleep duration may be shorter than {@code millis} if we catch a {@link InterruptedException}. + * The sleep duration may be shorter than duration if we catch a {@link InterruptedException}. * </p> * - * @param millis the length of time to sleep in milliseconds + * @param duration the length of time to sleep. * @since 3.13.0 */ - public static void sleepQuietly(final long millis) { + public static void sleepQuietly(final Duration duration) { try { - sleep(Duration.ofMillis(millis)); + sleep(duration); } catch (final InterruptedException e) { // be quiet. } |