@Test public void runTask() { final ManualTimingSource ts = new ManualTimingSource(); taskCounter = 0; ts.submit(new Runnable() { public void run() { taskCounter++; } }); ts.tick(); Assert.assertEquals(1, taskCounter); }
public final void submit(Runnable task) { if (task == null) return; final WrappedRunnable wrapped = new WrappedRunnable(task); f_oneShotQueue.add(wrapped); }
TimingSource { public final void submit(Runnable task) { if (task == null) return; final WrappedRunnable wrapped = new WrappedRunnable(task); f_oneShotQueue.add(wrapped); } }
TimingSource { public final void submit(Runnable task) { if (task == null) return; final WrappedRunnable wrapped = new WrappedRunnable(task); f_oneShotQueue.add(wrapped); }  }
TimingSource { public final void submit(Runnable task) { if (task == null) return; final WrappedRunnable wrapped = new WrappedRunnable(task); f_oneShotQueue.add(wrapped); }  abstract void init(); abstract void dispose(); abstract boolean isDisposed(); final void addTickListener(TickListener listener); final void removeTickListener(TickListener listener); final void addPostTickListener(PostTickListener listener); final void removePostTickListener(PostTickListener listener); final void submit(Runnable task); void runPerTick(); }
TimingSource { public final void submit(Runnable task) { if (task == null) return; final WrappedRunnable wrapped = new WrappedRunnable(task); f_oneShotQueue.add(wrapped); }  abstract void init(); abstract void dispose(); abstract boolean isDisposed(); final void addTickListener(TickListener listener); final void removeTickListener(TickListener listener); final void addPostTickListener(PostTickListener listener); final void removePostTickListener(PostTickListener listener); final void submit(Runnable task); void runPerTick();  }