stop watch problem in android
<p>i creating for stopwatch with start,stop i use following code it started but not stop. please help me.
my code:</p>

<pre><code>public class StopWatch2 extends Activity implements Runnable{

// text view influenced by the Thread
private TextView threadModifiedText;
int time=0;
Button b1,b2,b3;
/** Called when the activity is first created. */
Thread currentThread = new Thread(this);
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.stopwatch);

    b1=(Button)findViewById(R.id.button1);
    b2=(Button)findViewById(R.id.button2);
    b3=(Button)findViewById(R.id.button3);
    threadModifiedText = (TextView) findViewById(R.id.textView1);
    b1.setOnClickListener(new View.OnClickListener() 
    {
        public void onClick(View view) 
        {
            currentThread.start();
        }

    });     
    b2.setOnClickListener(new View.OnClickListener() 
    {
        public void onClick(View view) 
        {
            currentThread.stop();
        }

    });               
}

//Method you must override to control what the Thread is doing
@Override
public void run(){
    try {
        while(true){
            currentThread.sleep(1000, 0);
            threadHandler.sendEmptyMessage(0);
        }
        // signaling things to the outside world goes like this  

    } catch (InterruptedException e) {
    }   
} 
private Handler threadHandler = new Handler() {
    public void handleMessage(android.os.Message msg) {
        time++;
        threadModifiedText.setText(""+time);
    }
};
</code></pre>

<p>}</p>
