You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/12/17 07:44:58 UTC

[GitHub] [rocketmq] ShadowySpirits commented on issue #5720: [code smell] System.currentTimeMillis() is a static method ,wrap it as a class method is inconvenient.

ShadowySpirits commented on issue #5720:
URL: https://github.com/apache/rocketmq/issues/5720#issuecomment-1356099094

   The current implementation reserves the possibility to use a different clock source, such as using a mock clock source in testing.
   
   There is a similar usage in guava:
   
   ```java
     /**
      * Creates (but does not start) a new stopwatch, using the specified time source.
      *
      * @since 15.0
      */
     public static Stopwatch createUnstarted(Ticker ticker) {
       return new Stopwatch(ticker);
     }
   ```


-- 
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@rocketmq.apache.org

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