diff --git a/core/src/main/java/org/elasticsearch/threadpool/ThreadPool.java b/core/src/main/java/org/elasticsearch/threadpool/ThreadPool.java index 750d670ad7f..f6e359baafb 100644 --- a/core/src/main/java/org/elasticsearch/threadpool/ThreadPool.java +++ b/core/src/main/java/org/elasticsearch/threadpool/ThreadPool.java @@ -564,7 +564,7 @@ public class ThreadPool extends AbstractComponent { EstimatedTimeThread(String name, long interval) { super(name); this.interval = interval; - this.estimatedTimeInMillis = System.currentTimeMillis(); + this.estimatedTimeInMillis = TimeValue.nsecToMSec(System.nanoTime()); this.counter = new TimeCounter(); setDaemon(true); } @@ -576,7 +576,7 @@ public class ThreadPool extends AbstractComponent { @Override public void run() { while (running) { - estimatedTimeInMillis = System.currentTimeMillis(); + estimatedTimeInMillis = TimeValue.nsecToMSec(System.nanoTime()); try { Thread.sleep(interval); } catch (InterruptedException e) {