[#1246] Correctly convert to nanos
This commit is contained in:
parent
d34daebeca
commit
51de21f250
@ -196,8 +196,8 @@ public class HashedWheelTimer implements Timer {
|
||||
wheel = createWheel(ticksPerWheel);
|
||||
mask = wheel.length - 1;
|
||||
|
||||
// Convert tickDuration to milliseconds.
|
||||
this.tickDuration = tickDuration = unit.toMillis(tickDuration);
|
||||
// Convert tickDuration to nanos.
|
||||
this.tickDuration = tickDuration = unit.toNanos(tickDuration);
|
||||
|
||||
// Prevent overflow.
|
||||
if (tickDuration == Long.MAX_VALUE || tickDuration >= Long.MAX_VALUE / wheel.length) {
|
||||
|
Loading…
Reference in New Issue
Block a user