MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / delayTicks

Method delayTicks

src/main/java/field/app/RunLoop.java:292–309  ·  view source on GitHub ↗
(Runnable p0, int ticks)

Source from the content-addressed store, hash-verified

290
291 public void delayTicks(Runnable p0, int ticks) {
292
293 serviceVector.add(() -> {
294 mainLoop.attach(new Scene.Perform() {
295 int t = 0;
296
297 @Override
298 public boolean perform(int pass) {
299 if (t++ > ticks) {
300 p0.run();
301 return false;
302 }
303 return true;
304 }
305
306 });
307 });
308 }
309
310 public void exit() {
311 try {
312 if (exitStarted.compareAndSet(false, true)) {

Callers 7

DrawingMethod · 0.80
loadedMethod · 0.80
StartupClass · 0.80
PseudoMethod · 0.80
chordAtMethod · 0.80
downMethod · 0.80
bootMethod · 0.80

Calls 2

addMethod · 0.45
attachMethod · 0.45

Tested by

no test coverage detected