aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/java/kamon/jsr166/LongMaxUpdater.java
diff options
context:
space:
mode:
Diffstat (limited to 'kamon-core/src/main/java/kamon/jsr166/LongMaxUpdater.java')
-rw-r--r--kamon-core/src/main/java/kamon/jsr166/LongMaxUpdater.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/kamon-core/src/main/java/kamon/jsr166/LongMaxUpdater.java b/kamon-core/src/main/java/kamon/jsr166/LongMaxUpdater.java
index e4ba8807..fc9ea4e5 100644
--- a/kamon-core/src/main/java/kamon/jsr166/LongMaxUpdater.java
+++ b/kamon-core/src/main/java/kamon/jsr166/LongMaxUpdater.java
@@ -114,17 +114,17 @@ public class LongMaxUpdater extends Striped64 implements Serializable {
*
* @return the maximum
*/
- public long maxThenReset() {
+ public long maxThenReset(long newValue) {
Cell[] as = cells;
long max = base;
- base = Long.MIN_VALUE;
+ base = newValue;
if (as != null) {
int n = as.length;
for (int i = 0; i < n; ++i) {
Cell a = as[i];
if (a != null) {
long v = a.value;
- a.value = Long.MIN_VALUE;
+ a.value = newValue;
if (v > max)
max = v;
}