summaryrefslogtreecommitdiffstats
path: root/jdisc_core/src/main/java/com/yahoo/jdisc/core/ScheduledQueue.java
diff options
context:
space:
mode:
Diffstat (limited to 'jdisc_core/src/main/java/com/yahoo/jdisc/core/ScheduledQueue.java')
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/core/ScheduledQueue.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/core/ScheduledQueue.java b/jdisc_core/src/main/java/com/yahoo/jdisc/core/ScheduledQueue.java
index f41bb32127e..355d6aee43a 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/core/ScheduledQueue.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/core/ScheduledQueue.java
@@ -10,10 +10,10 @@ import java.util.Queue;
*/
class ScheduledQueue {
- public static final int MILLIS_PER_SLOT = 100;
- public static final int NUM_SLOTS = 512;
- public static final int SLOT_MASK = 511; // bitmask to modulo NUM_SLOTS
- public static final int ITER_SHIFT = 9; // number of bits to shift off SLOT_MASK
+ public static final int MILLIS_PER_SLOT = 10;
+ public static final int NUM_SLOTS = 1024;
+ public static final int SLOT_MASK = NUM_SLOTS - 1; // bitmask to modulo NUM_SLOTS
+ public static final int ITER_SHIFT = Integer.numberOfTrailingZeros(NUM_SLOTS); // number of bits to shift off SLOT_MASK
private final Entry[] slots = new Entry[NUM_SLOTS + 1];
private final int[] counts = new int[NUM_SLOTS + 1];