Repository: incubator-slider
Updated Branches:
  refs/heads/feature/SLIDER-82_ANTI_AFFINITY_REQUIRED [created] 12893b96b


SLIDER-935 Move Duration to using monotonic time


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/ad0be556
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/ad0be556
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/ad0be556

Branch: refs/heads/feature/SLIDER-82_ANTI_AFFINITY_REQUIRED
Commit: ad0be556795eab90c3db0ff9ff28a248f4af1a1b
Parents: 9b17e5e
Author: Steve Loughran <ste...@apache.org>
Authored: Mon Sep 14 17:06:01 2015 +0100
Committer: Steve Loughran <ste...@apache.org>
Committed: Mon Sep 14 17:06:01 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/slider/common/tools/Duration.java   | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/ad0be556/slider-core/src/main/java/org/apache/slider/common/tools/Duration.java
----------------------------------------------------------------------
diff --git 
a/slider-core/src/main/java/org/apache/slider/common/tools/Duration.java 
b/slider-core/src/main/java/org/apache/slider/common/tools/Duration.java
index 25b68ae..e5fa424 100644
--- a/slider-core/src/main/java/org/apache/slider/common/tools/Duration.java
+++ b/slider-core/src/main/java/org/apache/slider/common/tools/Duration.java
@@ -68,7 +68,7 @@ public class Duration implements Closeable {
   }
 
   protected long now() {
-    return System.currentTimeMillis();
+    return System.nanoTime()/1000000;
   }
 
   public long getInterval() {
@@ -103,9 +103,7 @@ public class Duration implements Closeable {
         builder.append(" -  exceeded");
       }
     }
-    
     return  builder.toString();
   }
 
-
 }

Reply via email to