Android: Chronometer Starting From Start of Activity and Not From Button Click
<p>I have a chronometer and I would like it to start counting from when the user clicks a button and not from the start of the activity. Currently, when the user clicks the button to start the timer from 0, it just shows the time from the activity started. Here is the relevant code:</p>

<pre><code>@Override
public void onClick(View v) {
    switch (v.getId()) {
        case R.id.startTimer: {
            Chronometer stopWatch = (Chronometer) findViewById(R.id.chrono);
            startTime = SystemClock.elapsedRealtime();

            timer = (TextView) findViewById(R.id.timerText);
            stopWatch.setOnChronometerTickListener(new OnChronometerTickListener(){
                @Override
                public void onChronometerTick(Chronometer arg0) {
                    countUp = (SystemClock.elapsedRealtime() - arg0.getBase()) / 1000;
                    String asText = (countUp / 60) + ":" + (String.format("%02d", (countUp % 60))); 
                    timer.setText(asText);
                }
            });
            stopWatch.start();
            break;
        }
...
</code></pre>

<p>What do I need to change?</p>
