title: Chronometer with Runnable doesn't work
body: <p>Hello I create a chronometer for my Game. The problem is that I created in 2 classes. And this doesn´t work. I have an Exepction.</p>
  
  <pre><code> public class Crono1 extends Activity implements Callback{
  
  public TextView txtTiempo;
  public boolean detenido;
  public boolean pausado;
  private Handler handler;
  String cronometro;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      txtTiempo = (TextView) findViewById(R.id.ConTiempo);
      final Button btn = (Button) findViewById(R.id.BtnAccion);
      final Button btnDetener = (Button) findViewById(R.id.BtnDetener);
      detenido = false;
      pausado = true;
      handler = new Handler(this);
  
      btn.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
  
              Tiempo w = new Tiempo (handler);
              Thread t = new Thread (w);
              t.start();
          }
      });
  
      btnDetener.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
              detenido = true;
              txtTiempo.setText("00:00:00:00");
          }
      });
  }
  @Override
  public boolean handleMessage(Message msg) {
    TextView texto = (TextView) findViewById(R.id.ConTiempo);
  
    Integer text = (Integer) msg.obj;
      texto.setText(text+"");
      Log.d("ENTRO",msg.obj.toString());
      return true; 
  }
  </code></pre>
  
  <hr>
  
  <pre><code> public class Time implements Runnable{
  public TextView txtTiempo;
  public boolean detenido;
  public boolean pausado;
  int centesimas = 00,minutos=00, segundos=00, horas=00;
  String cronometro;
  private Handler handler;
  
  public Time (Handler handler){
      this.handler = handler;
   }
  
  @Override
  public void run (){
      while(!detenido)
      {
          while(!pausado)
          {
              try {
                  //if(centesimas == 99){
                      //centesimas = 00;
                      segundos++;
                  //}
                  if (segundos == 59) {
                      segundos = 00;
                      minutos++;
                  }
                  if (minutos == 59) {
                      minutos = 00;
                      //horas++;
                  }
                  centesimas++;
                  //cronometro = /*horas + ":" +*/ minutos + ":" + segundos /*+ ":" + centesimas*/;
                  sendMsg (minutos + ":" + segundos);
                  handler.sendEmptyMessage(0);
                  Thread.sleep(900);
              } catch (Exception ex) {
                  ex.printStackTrace();
              }
  
          }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>private void sendMsg(String string)
  {
      Message message = new Message ();
      message.obj = string;
      handler.sendMessage(message);
  }
  </code></pre>
  
  <p><strong>The Exepction is "Unchaught handler" and "ClassCastExeption"</strong>. What is my mistake? And How can do for: If the time is 1:50, Finish the Application or use an Intent??</p>