@@ -0,0 +1,1629 @@
+package replicant;%0A%0Aimport java.util.concurrent.Executors;%0Aimport java.util.concurrent.ScheduledExecutorService;%0Aimport java.util.concurrent.ScheduledFuture;%0Aimport java.util.concurrent.TimeUnit;%0Aimport javax.annotation.Nonnull;%0Aimport javax.annotation.Nullable;%0A%0A/**%0A * A thin abstraction for scheduling callbacks that works in JVM and GWT environments.%0A */%0Afinal class Scheduler%0A%7B%0A  private static final SchedulerSupport c_support = new SchedulerSupport();%0A%0A  public static void schedule( @Nonnull final SafeFunction%3CBoolean%3E command )%0A  %7B%0A    c_support.schedule( command );%0A  %7D%0A%0A  /**%0A   * JVM Compatible variant which will have fields and methods stripped out during GWT compile and thus fallback to GWT variant.%0A   */%0A  private static final class SchedulerSupport%0A    extends AbstractSchedulerSupport%0A  %7B%0A    @GwtIncompatible%0A    private final ScheduledExecutorService _executorService = Executors.newScheduledThreadPool( 1 );%0A    @GwtIncompatible%0A    @Nullable%0A    private ScheduledFuture%3C?%3E _future;%0A%0A    @GwtIncompatible%0A    @Override%0A    void schedule( @Nonnull final SafeFunction%3CBoolean%3E command )%0A    %7B%0A      final Runnable action = () -%3E %7B%0A        if ( !command.call() && null != _future )%0A        %7B%0A          _future.cancel( false );%0A          _future = null;%0A        %7D%0A      %7D;%0A      _future = _executorService.scheduleAtFixedRate( action, 0, 1, TimeUnit.MILLISECONDS );%0A    %7D%0A  %7D%0A%0A  private static abstract class AbstractSchedulerSupport%0A  %7B%0A    void schedule( @Nonnull final SafeFunction%3CBoolean%3E command )%0A    %7B%0A      com.google.gwt.core.client.Scheduler.get().scheduleIncremental( command::call );%0A    %7D%0A  %7D%0A%7D%0A

Add in simple abstraction for scheduling