You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/12/15 17:57:53 UTC

[GitHub] [pulsar] lhotari commented on a change in pull request #13057: [Producer] Change the time units from ns to ms

lhotari commented on a change in pull request #13057:
URL: https://github.com/apache/pulsar/pull/13057#discussion_r769862398



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -1173,7 +1173,7 @@ static OpSendMsg create(MessageImpl<?> msg, ByteBufPair cmd, long sequenceId, Se
             op.cmd = cmd;
             op.callback = callback;
             op.sequenceId = sequenceId;
-            op.createdAt = System.nanoTime();
+            op.createdAt = System.currentTimeMillis();

Review comment:
       > Perhaps we could continue using `system.nanotime()` and convert `ns` to `second` only before logging? What do you think? @merlimat @michaeljmarshall 
   
   This would be the correct solution since System.nanotime should be used for measuring durations.




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org