diff --git a/src/main/java/com/xiaomi/infra/pegasus/rpc/async/ClientRequestRound.java b/src/main/java/com/xiaomi/infra/pegasus/rpc/async/ClientRequestRound.java index 9f9d2d70..aa44317e 100644 --- a/src/main/java/com/xiaomi/infra/pegasus/rpc/async/ClientRequestRound.java +++ b/src/main/java/com/xiaomi/infra/pegasus/rpc/async/ClientRequestRound.java @@ -22,6 +22,7 @@ import com.xiaomi.infra.pegasus.operator.client_operator; import com.xiaomi.infra.pegasus.rpc.Table; import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; import org.slf4j.Logger; /** Created by weijiesun on 16-11-25. */ @@ -56,7 +57,7 @@ public ClientRequestRound( this.enableCounter = enableCounter; this.createNanoTime = System.nanoTime(); - this.expireNanoTime = createNanoTime + timeoutInMilliseconds; + this.expireNanoTime = createNanoTime + TimeUnit.MILLISECONDS.toNanos(timeoutInMilliseconds); this.isCompleted = false; this.tryId = 1; this.backupRequestTask = null;