From 1155deaeb26a8b95eed86bdee2e5845a5baee801 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.
---
opends/src/server/org/opends/server/util/StaticUtils.java | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/util/StaticUtils.java b/opends/src/server/org/opends/server/util/StaticUtils.java
index 855fa3e..210a86e 100644
--- a/opends/src/server/org/opends/server/util/StaticUtils.java
+++ b/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