simplifies handling of time in unload handler (#4548)

diff --git a/core/src/main/java/org/apache/accumulo/core/util/time/SteadyTime.java b/core/src/main/java/org/apache/accumulo/core/util/time/SteadyTime.java
index 4007b51..d16f15c 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/time/SteadyTime.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/time/SteadyTime.java
@@ -56,6 +56,10 @@
     return time.minus(other.getDuration());
   }
 
+  public SteadyTime plus(Duration other) {
+    return SteadyTime.from(time.plus(other));
+  }
+
   @Override
   public boolean equals(Object o) {
     if (this == o) {
@@ -90,4 +94,5 @@
   public static SteadyTime from(Duration time) {
     return new SteadyTime(time);
   }
+
 }
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java
index 7a6358b..af16bee 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java
@@ -103,6 +103,7 @@
 import org.apache.accumulo.core.util.Halt;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.threads.Threads;
+import org.apache.accumulo.core.util.time.SteadyTime;
 import org.apache.accumulo.server.ServerContext;
 import org.apache.accumulo.server.compaction.CompactionInfo;
 import org.apache.accumulo.server.compaction.FileCompactor;
@@ -1075,8 +1076,8 @@
 
     KeyExtent extent = KeyExtent.fromThrift(textent);
 
-    server.resourceManager.addMigration(extent,
-        new UnloadTabletHandler(server, extent, goal, requestTime));
+    server.resourceManager.addMigration(extent, new UnloadTabletHandler(server, extent, goal,
+        SteadyTime.from(requestTime, TimeUnit.MILLISECONDS)));
   }
 
   @Override
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/UnloadTabletHandler.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/UnloadTabletHandler.java
index 1458901..27c1048 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/UnloadTabletHandler.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/UnloadTabletHandler.java
@@ -18,11 +18,6 @@
  */
 package org.apache.accumulo.tserver;
 
-import static java.util.concurrent.TimeUnit.MILLISECONDS;
-import static java.util.concurrent.TimeUnit.NANOSECONDS;
-
-import java.util.concurrent.TimeUnit;
-
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.dataImpl.KeyExtent;
 import org.apache.accumulo.core.manager.thrift.TabletLoadState;
@@ -31,6 +26,7 @@
 import org.apache.accumulo.core.metadata.TabletLocationState.BadLocationStateException;
 import org.apache.accumulo.core.metadata.schema.TabletMetadata.Location;
 import org.apache.accumulo.core.tablet.thrift.TUnloadTabletGoal;
+import org.apache.accumulo.core.util.time.NanoTime;
 import org.apache.accumulo.core.util.time.SteadyTime;
 import org.apache.accumulo.server.manager.state.DistributedStoreException;
 import org.apache.accumulo.server.manager.state.TabletStateStore;
@@ -43,15 +39,17 @@
   private static final Logger log = LoggerFactory.getLogger(UnloadTabletHandler.class);
   private final KeyExtent extent;
   private final TUnloadTabletGoal goalState;
-  private final long requestTimeSkew;
+  private final SteadyTime requestTime;
+  private final NanoTime createTime;
   private final TabletServer server;
 
   public UnloadTabletHandler(TabletServer server, KeyExtent extent, TUnloadTabletGoal goalState,
-      long requestTime) {
+      SteadyTime requestTime) {
     this.extent = extent;
     this.goalState = goalState;
     this.server = server;
-    this.requestTimeSkew = requestTime - NANOSECONDS.toMillis(System.nanoTime());
+    this.requestTime = requestTime;
+    this.createTime = NanoTime.now();
   }
 
   @Override
@@ -124,8 +122,8 @@
               && !server.getConfiguration().getBoolean(Property.MANAGER_METADATA_SUSPENDABLE))) {
         TabletStateStore.unassign(server.getContext(), tls, null);
       } else {
-        TabletStateStore.suspend(server.getContext(), tls, null, SteadyTime.from(
-            requestTimeSkew + NANOSECONDS.toMillis(System.nanoTime()), TimeUnit.MILLISECONDS));
+        TabletStateStore.suspend(server.getContext(), tls, null,
+            requestTime.plus(createTime.elapsed()));
       }
     } catch (DistributedStoreException ex) {
       log.warn("Unable to update storage", ex);