Bill commented on a change in pull request #5743:
URL: https://github.com/apache/geode/pull/5743#discussion_r527147993



##########
File path: geode-common/src/main/java/org/apache/geode/internal/Retry.java
##########
@@ -82,7 +84,9 @@ public void sleep(long sleepTime, TimeUnit sleepTimeUnit) 
throws InterruptedExce
       if (predicate.test(value)) {
         return value;
       } else {
-        timer.sleep(interval, intervalUnit);
+        long sleepTimeInNano =
+            Math.min(NANOSECONDS.convert(interval, intervalUnit), until - 
timer.nanoTime());

Review comment:
       I recommend converting this outside the loop since it never changes.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to