From b951080705437458a5c25cef07101682efdd135f Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 17 Apr 2013 08:10:01 +0000
Subject: [PATCH] Added a StaticUtils.sleep(long) utility method.

---
 opendj-sdk/opends/src/server/org/opends/server/util/StaticUtils.java |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/util/StaticUtils.java b/opendj-sdk/opends/src/server/org/opends/server/util/StaticUtils.java
index 855fa3e..210a86e 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/util/StaticUtils.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/util/StaticUtils.java
@@ -4693,6 +4693,24 @@
   }
 
   /**
+   * Calls {@link Thread#sleep(long)}, surrounding it with the mandatory
+   * <code>try</code> / <code>catch(InterruptedException)</code> block.
+   *
+   * @param millis
+   *          the length of time to sleep in milliseconds
+   */
+  public static void sleep(long millis)
+  {
+    try
+    {
+      Thread.sleep(millis);
+    }
+    catch (InterruptedException wokenUp)
+    {
+    }
+  }
+
+  /**
    * Returns an {@link Iterable} returning the passed in {@link Iterator}. THis
    * allows using methods returning Iterators with foreach statements.
    * <p>

--
Gitblit v1.10.0