diff options
| author | Luck <git@lucko.me> | 2018-06-09 22:47:50 +0100 |
|---|---|---|
| committer | Luck <git@lucko.me> | 2018-06-09 22:47:50 +0100 |
| commit | 48924d99d3f91d7319eceea74619c5ebcf4d76fa (patch) | |
| tree | 9c9a2030933f3da447059f99f8ff174842dbefce /spark-common/src/main/java/me/lucko/spark/profiler/SamplerBuilder.java | |
| parent | 7e4ca1ef197422cb08be675707641f68c4e52f5f (diff) | |
| download | spark-48924d99d3f91d7319eceea74619c5ebcf4d76fa.tar.gz spark-48924d99d3f91d7319eceea74619c5ebcf4d76fa.tar.bz2 spark-48924d99d3f91d7319eceea74619c5ebcf4d76fa.zip | |
Use ScheduledExecutorService instead of Timer
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/profiler/SamplerBuilder.java')
| -rw-r--r-- | spark-common/src/main/java/me/lucko/spark/profiler/SamplerBuilder.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/profiler/SamplerBuilder.java b/spark-common/src/main/java/me/lucko/spark/profiler/SamplerBuilder.java index 7db0515..733f4e3 100644 --- a/spark-common/src/main/java/me/lucko/spark/profiler/SamplerBuilder.java +++ b/spark-common/src/main/java/me/lucko/spark/profiler/SamplerBuilder.java @@ -1,6 +1,5 @@ package me.lucko.spark.profiler; -import java.util.Timer; import java.util.concurrent.TimeUnit; /** @@ -48,7 +47,7 @@ public class SamplerBuilder { return this; } - public Sampler start(Timer samplingThread) { + public Sampler start() { Sampler sampler; if (this.ticksOver != -1 && this.tickCounter != null) { sampler = new Sampler(this.samplingInterval, this.threadDumper, this.threadGrouper, this.timeout, this.tickCounter, this.ticksOver); @@ -56,7 +55,7 @@ public class SamplerBuilder { sampler = new Sampler(this.samplingInterval, this.threadDumper, this.threadGrouper, this.timeout); } - sampler.start(samplingThread); + sampler.start(); return sampler; } |
