Android: chronometer as a persistent stopwatch. How to set starting time? What is Chronometer “Base”?

You can use Chronometer. You should also check this thread. EDIT: The solution: public class ChronoExample extends Activity { Chronometer mChronometer; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout layout = new LinearLayout(this); layout.setOrientation(LinearLayout.VERTICAL); mChronometer = new Chronometer(this); // Set the initial value mChronometer.setText(“00:10”); layout.addView(mChronometer); Button startButton = new Button(this); startButton.setText(“Start”); startButton.setOnClickListener(mStartListener); layout.addView(startButton); Button stopButton … Read more