()
| 33 | private volatile boolean ticking; |
| 34 | |
| 35 | public Ticker() { |
| 36 | this.ticklist = new ArrayList<>(4096); |
| 37 | this.newTicks = new ArrayList<>(128); |
| 38 | this.removeTicks = new ArrayList<>(128); |
| 39 | ticking = false; |
| 40 | J.ar(() -> { |
| 41 | if (!ticking) { |
| 42 | tick(); |
| 43 | } |
| 44 | }, 0); |
| 45 | } |
| 46 | |
| 47 | public void register(Ticked ticked) { |
| 48 | synchronized (newTicks) { |