cshannon commented on code in PR #4866:
URL: https://github.com/apache/accumulo/pull/4866#discussion_r1756610085
##########
core/src/main/java/org/apache/accumulo/core/clientImpl/ThriftScanner.java:
##########
@@ -275,12 +275,12 @@ static <T> Optional<T> waitUntil(Supplier<Optional<T>>
condition, Duration maxWa
.incrementBy(100, MILLISECONDS).maxWait(1, SECONDS).backOffFactor(1.5)
.logInterval(3, TimeUnit.MINUTES).createRetry();
- long startTime = System.nanoTime();
+ Timer startTime = Timer.startNew();
Optional<T> optional = condition.get();
while (optional.isEmpty()) {
log.trace("For tableId {} scan server selector is waiting for '{}'",
tableId, description);
- var elapsedTime = Duration.ofNanos(System.nanoTime() - startTime);
+ var elapsedTime = startTime.elapsed();
if (elapsedTime.compareTo(timeoutLeft) > 0) {
Review Comment:
Thanks for the suggestion, this definitely is the better way to do it, I'm
making the changes now.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]