| | |
| | | |
| | | // 更新当前值 |
| | | if (currentValue == null) { |
| | | AdjustmentValueCache.getCurrentValue().put(symbol, currentValue_frequency); |
| | | AdjustmentValueCache.getCurrentValue().put(symbol, currentValue_frequency.setScale(decimal, RoundingMode.HALF_UP)); |
| | | } else { |
| | | AdjustmentValueCache.getCurrentValue().put(symbol, |
| | | currentValue.add(currentValue_frequency)); |
| | | currentValue.add(currentValue_frequency).setScale(decimal, RoundingMode.HALF_UP)); |
| | | } |
| | | |
| | | // 更新延迟值 |
| | | delayValue.setValue(delayValue.getValue().subtract(currentValue_frequency)); |
| | | delayValue.setValue(delayValue.getValue().subtract(currentValue_frequency).setScale(decimal, RoundingMode.HALF_UP)); |
| | | delayValue.setSecond(Arith.sub(delayValue.getSecond(), Arith.div(this.interval, 1000.0D))); |
| | | AdjustmentValueCache.getDelayValue().put(symbol, delayValue); |
| | | |