修复滑动窗口出现负数的bug
This commit is contained in:
@@ -61,7 +61,7 @@ public class KLALBController {
|
||||
public HighAccuracyClock getClock() {
|
||||
return clock;
|
||||
}
|
||||
private final long TIME_WINDOW=50000000000L;
|
||||
private final long TIME_WINDOW=30000000000L;
|
||||
private SpeedAndTrafficMonitorDataImpl linkMonitor = new SpeedAndTrafficMonitorDataImpl(
|
||||
new HashMapTimestampMonitor<UUID>(HighAccuracyClock.SYSTEM_CLOCK, "up", 100,TIME_WINDOW ),
|
||||
new HashMapTimestampMonitor<UUID>(HighAccuracyClock.SYSTEM_CLOCK, "down", 100, TIME_WINDOW));
|
||||
@@ -733,9 +733,11 @@ public class KLALBController {
|
||||
}
|
||||
|
||||
protected void initKLALB(boolean enableVirtualAdapter, IPv6AddressGroup selfg) {
|
||||
KLALBScheduler.getScheduler().scheduleAtFixedRate( ()->{
|
||||
KLALBScheduler.getScheduler().scheduleWithFixedDelay( ()->{
|
||||
linkMonitor.update();
|
||||
datatMonitor.update();
|
||||
},1,1,TimeUnit.MILLISECONDS);
|
||||
KLALBScheduler.getScheduler().scheduleWithFixedDelay( ()->{
|
||||
datatMonitor.update();
|
||||
},1,1,TimeUnit.MILLISECONDS);
|
||||
loadSRv6ProtocolStack(selfg, enableVirtualAdapter);
|
||||
loadController();
|
||||
|
||||
Reference in New Issue
Block a user