diff options
author | Luck <git@lucko.me> | 2018-12-19 14:07:01 +0000 |
---|---|---|
committer | Luck <git@lucko.me> | 2018-12-19 14:07:01 +0000 |
commit | 66a8afab99efb7ac7669961eb2e67e2244d494e5 (patch) | |
tree | 7930ab1768da5df81799995472292d73d6ce2647 /spark-common/src/main/java/me/lucko/spark/sampler/TickCounter.java | |
parent | db6ac9b36ae0242c53dc1452ac8fbc6cd7b748c2 (diff) | |
download | spark-66a8afab99efb7ac7669961eb2e67e2244d494e5.tar.gz spark-66a8afab99efb7ac7669961eb2e67e2244d494e5.tar.bz2 spark-66a8afab99efb7ac7669961eb2e67e2244d494e5.zip |
Count current tick using an int instead of LongAdder
Assuming 20tps, there's enough space in an int to store a tick count spanning a number of years :)
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/sampler/TickCounter.java')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/sampler/TickCounter.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/sampler/TickCounter.java b/spark-common/src/main/java/me/lucko/spark/sampler/TickCounter.java index d6b754b..059e420 100644 --- a/spark-common/src/main/java/me/lucko/spark/sampler/TickCounter.java +++ b/spark-common/src/main/java/me/lucko/spark/sampler/TickCounter.java @@ -41,7 +41,7 @@ public interface TickCounter extends AutoCloseable { * * @return the current tick */ - long getCurrentTick(); + int getCurrentTick(); /** * Adds a task to be called each time the tick increments |