title: CountDownTimer not working at all
body: <p>I am trying to run a CountDownTimer inside a Thread, but it just won't work..</p>
  
  <p>So in the MainActivitys onCreate I start it on Button click like that:</p>
  
  <pre><code>public void onClick(final View v) {
      Log.d("Main", "onClick");
      runOnUiThread(runner);
  }
  </code></pre>
  
  <p><code>runner</code> is an Instance of a class which implements <code>Runnable</code>:</p>
  
  <pre><code>private CountDownLatch doneSignal = new CountDownLatch(1);
  @Override
  public void run() {
      Log.d("WR", "run");
      this.countDown(20);
      Log.d("WR", "waiting");
      try {
          doneSignal.await();
      } catch (final InterruptedException ex) {
          Log.e("WR", ex.getMessage(), ex);
      }
      Log.d("WR", "waited");
  }
  private void countDown(int time) {
      final CountDownTimer timer = new CountDownTimer(time * 1000, 1000) {
  
          @Override
          public void onTick(final long millisUntilFinished) {
              Log.d("WR", "onTick");
          }
  
          @Override
          public void onFinish() {
              Log.d("WR", "onFinish");
              doneSignal.countDown();
          }
      };
      Log.d("WR", "starting");
      timer.start();
      Log.d("WR", "started");
  }
  </code></pre>
  
  <p>With this code, the application just freezes after Logging onClick, run and starting.
  Changing <code>runOnUiThread(runner)</code> to <code>new Thread(runner).start();</code> makes the application crash immediately after Logging onClick with no more output.</p>
  
  <p>Some research said that the CountDownTimer needs to be run on UI-Thread due to the use of a Handler. But it just freezes. </p>
  
  <p>When I remove the entire Thread stuff and just call <code>runner.run();</code> in the Buttons onClick (also removing the implements Runnable in the runner Instance) I get following Log entries: <code>onCLick, run, starting, started, waiting</code>. But then nothing happens, as if the timer does not run, no call of the onTick method.</p>
  
  <p>How can I fix my CountDownTimer?</p>