neuyilan commented on a change in pull request #1827:
URL: https://github.com/apache/iotdb/pull/1827#discussion_r505994859



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/server/Timer.java
##########
@@ -183,14 +184,33 @@ public void add(long val) {
     }
 
     /**
-     * This method equals `add(System.nanoTime() - start)`. We wrap 
`System.nanoTime()` in this
-     * method to avoid unnecessary calls when instrumenting is disabled.
-     *
-     * @param start
+     * set now time as the operation's start time
      */
-    public void addNanoFromStart(long start) {
+    public void setStartTime() {
+      setStartTime(System.nanoTime());
+    }
+
+    public void setStartTime(long startTime) {
+      if (ENABLE_INSTRUMENTING) {
+        this.startTime = startTime;
+      }
+    }

Review comment:
       Got it




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