diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java index 9ed710c7bf9..d52586db7db 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java @@ -233,7 +233,7 @@ public class WritableRpcEngine implements RpcEngine { throws Throwable { long startTime = 0; if (LOG.isDebugEnabled()) { - startTime = Time.now(); + startTime = Time.monotonicNow(); } // if Tracing is on then start a new span for this rpc. @@ -253,7 +253,7 @@ public class WritableRpcEngine implements RpcEngine { if (traceScope != null) traceScope.close(); } if (LOG.isDebugEnabled()) { - long callTime = Time.now() - startTime; + long callTime = Time.monotonicNow() - startTime; LOG.debug("Call: " + method.getName() + " " + callTime); } return value.get();