Skip to content

Commit

Permalink
bugfix: GCLONG is expressed in millis
Browse files Browse the repository at this point in the history
  • Loading branch information
ar committed Jun 14, 2024
1 parent aa45115 commit 4defbc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jpos/src/main/java/org/jpos/space/TSpace.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class TSpace<K,V> implements LocalSpace<K,V>, Loggeable, Runnable {
protected Map entries;
protected TSpace sl; // space listeners
public static final long GCDELAY = 5*1000;
private static final long GCLONG = 60*1000;
private static final long GCLONG = 60_000L;
private static final long NRD_RESOLUTION = 500L;
private static final int MAX_ENTRIES_IN_DUMP = 1000;
private static final long ONE_MILLION = 1_000_000L; // multiplier millis --> nanos
Expand Down Expand Up @@ -190,7 +190,7 @@ public void run () {

public void gc () {
gc(0);
if (System.nanoTime() - lastLongGC > GCLONG) {
if (System.nanoTime() - lastLongGC > GCLONG*ONE_MILLION) {
gc(1);
lastLongGC = System.nanoTime();
}
Expand Down

0 comments on commit 4defbc6

Please sign in to comment.