()
| 309 | int FADE_TIMER_VALUE = Emulator.withComputer(c-> (int) (c.getMotherboard().getSpeedInHz() / 60), 100); |
| 310 | |
| 311 | @Override |
| 312 | public void tick() { |
| 313 | Emulator.withComputer(c-> c.getCpu().performSingleTrace()); |
| 314 | if (fadeCounter-- <= 0) { |
| 315 | fadeCounter = FADE_TIMER_VALUE; |
| 316 | memoryCells.values().stream() |
| 317 | .filter(MemoryCell::hasCounts) |
| 318 | .forEach((cell) -> { |
| 319 | cell.execCount.set(Math.max(0, cell.execCount.get() - fadeRate)); |
| 320 | cell.readCount.set(Math.max(0, cell.readCount.get() - fadeRate)); |
| 321 | cell.writeCount.set(Math.max(0, cell.writeCount.get() - fadeRate)); |
| 322 | if (MemoryCell.listener != null) { |
| 323 | MemoryCell.listener.changed(null, cell, cell); |
| 324 | } |
| 325 | }); |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | AtomicInteger pendingInspectorUpdates = new AtomicInteger(0); |
| 330 | public void onInspectorChanged() { |
nothing calls this directly
no test coverage detected