315157973 commented on a change in pull request #12016:
URL: https://github.com/apache/pulsar/pull/12016#discussion_r707937881



##########
File path: 
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/ManagedLedgerWriter.java
##########
@@ -240,7 +238,8 @@ public void run() {
 
                     // Acquire 1 sec worth of messages to have a slower ramp-up
                     rateLimiter.acquire((int) msgRate);
-                    final long startTime = System.currentTimeMillis();
+                    final long startTime = System.nanoTime();
+                    final long testEndTime = startTime + (long) 
(arguments.testTime * 1e9);

Review comment:
       I recommend using `TimeUnit.SECONDS.toNanos()` instead of `1e9` to make 
it more understandable to other developers




-- 
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]


Reply via email to