MCPcopy Create free account
hub / github.com/badvision/jace / tick

Method tick

src/main/java/jace/cheat/MetaCheat.java:311–327  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 5

withComputerMethod · 0.95
performSingleTraceMethod · 0.80
setMethod · 0.80
getCpuMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected