schedule and Callable
<p>I'm trying to use ScheduledExecutorService inside the main activity, where there are a few user interface controls.  Under some circumstances I wish to delay the method invoked by one of them by a second:</p>

<pre><code>ScheduledExecutorService scheduledExecutorService =
     Executors.newScheduledThreadPool(5);

ScheduledFuture scheduledFuture = scheduledExecutorService.schedule(new Callable() {
 public Object call() throws Exception {
  stopSomething();
 }
},
1,
TimeUnit.SECONDS);

try {
 scheduledFuture.get();
} catch (InterruptedException e) {
 e.printStackTrace();
} catch (ExecutionException e) {
 e.printStackTrace();
}

scheduledExecutorService.shutdown();            
</code></pre>

<p>Such a snip of code would work in another part of the program, so I know the outline of this solution works at least there.  But in the main activity and in other parts of the program where I've tried (where I could actually use it), Eclipse keeps finding something wrong with this:</p>

<p>ScheduledFuture scheduledFuture = scheduledExecutorService.schedule(new Callable() {
 public Object call() throws Exception {</p>

<p>If the compile error isn't on <code>Object call() throws Exception</code>, it's on <code>schedule(new Callable()</code>, like right now.  </p>

<p>The red line under schedule is "The method schedule(Runnable, long, TimeUnit) in the type ScheduledExecutorService is not applicable for the arguments (new Callable(){}, int, TimeUnit)"</p>

<p>The red line under Callable is "Callable cannot be resolved to a type"</p>

<p>(Maybe .schedule (Runnable task, long delay, TimeUnit timeunit) is a better method to use here?  If so, what would account for the error "The method schedule(Runnable, long, TimeUnit) in the type ScheduledExecutorService is not applicable for the arguments (new Callable(){}, int, TimeUnit)"?  What does this want?  And how would it be composed?)</p>
